| 1 | /************************************************************************* |
|---|---|
| 2 | * libjson-rpc-cpp |
| 3 | ************************************************************************* |
| 4 | * @file abstractserverconnector.cpp |
| 5 | * @date 31.12.2012 |
| 6 | * @author Peter Spiess-Knafl <dev@spiessknafl.at> |
| 7 | * @license See attached LICENSE.txt |
| 8 | ************************************************************************/ |
| 9 | |
| 10 | #include "abstractserverconnector.h" |
| 11 | #include <cstdlib> |
| 12 | #include <jsonrpccpp/common/specificationwriter.h> |
| 13 | |
| 14 | using namespace std; |
| 15 | using namespace jsonrpc; |
| 16 | |
| 17 | AbstractServerConnector::AbstractServerConnector() { this->handler = NULL; } |
| 18 | |
| 19 | AbstractServerConnector::~AbstractServerConnector() {} |
| 20 | |
| 21 | void AbstractServerConnector::ProcessRequest(const string &request, string &response) { |
| 22 | if (this->handler != NULL) { |
| 23 | this->handler->HandleRequest(request, response); |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | void AbstractServerConnector::SetHandler(IClientConnectionHandler *handler) { this->handler = handler; } |
| 28 | |
| 29 | IClientConnectionHandler *AbstractServerConnector::GetHandler() { return this->handler; } |
| 30 |