ADTF  3.18.2
abstractserverconnector.h
1 /*************************************************************************
2  * libjson-rpc-cpp
3  *************************************************************************
4  * @file abstractserverconnector.h
5  * @date 31.12.2012
6  * @author Peter Spiess-Knafl <dev@spiessknafl.at>
7  * @license See attached LICENSE.txt
8  ************************************************************************/
9 
10 #ifndef JSONRPC_CPP_SERVERCONNECTOR_H_
11 #define JSONRPC_CPP_SERVERCONNECTOR_H_
12 
13 #include "iclientconnectionhandler.h"
14 #include <string>
15 
16 namespace jsonrpc {
17 
19 public:
21  virtual ~AbstractServerConnector();
22 
28  virtual bool StartListening() = 0;
34  virtual bool StopListening() = 0;
35 
36  void ProcessRequest(const std::string &request, std::string &response);
37 
38  void SetHandler(IClientConnectionHandler *handler);
39  IClientConnectionHandler *GetHandler();
40 
41 private:
42  IClientConnectionHandler *handler;
43 };
44 
45 } /* namespace jsonrpc */
46 #endif /* JSONRPC_CPP_ERVERCONNECTOR_H_ */
virtual bool StartListening()=0
This method should signal the Connector to start waiting for requests, in any way that is appropriate...
virtual bool StopListening()=0
This method should signal the Connector to stop waiting for requests, in any way that is appropriate ...