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
14using namespace std;
15using namespace jsonrpc;
16
17AbstractServerConnector::AbstractServerConnector() { this->handler = NULL; }
18
19AbstractServerConnector::~AbstractServerConnector() {}
20
21void AbstractServerConnector::ProcessRequest(const string &request, string &response) {
22 if (this->handler != NULL) {
23 this->handler->HandleRequest(request, response);
24 }
25}
26
27void AbstractServerConnector::SetHandler(IClientConnectionHandler *handler) { this->handler = handler; }
28
29IClientConnectionHandler *AbstractServerConnector::GetHandler() { return this->handler; }
30