|
LogCabin
|
Base class for RPC services. More...
#include <Service.h>
Public Member Functions | |
| Service () | |
| Constructor. | |
| virtual | ~Service () |
| Destructor. | |
| virtual void | handleRPC (ServerRPC serverRPC)=0 |
| This method is overridden by a subclass and invoked by the Server class when a new RPC arrives. | |
| virtual std::string | getName () const =0 |
| Return a short name for this service which can be used in things like log messages. | |
| Service (const Service &) | |
| Service & | operator= (const Service &) |
Base class for RPC services.
Each service handles a related set of RPCs from clients.
| LogCabin::RPC::Service::Service | ( | ) | [inline] |
| virtual LogCabin::RPC::Service::~Service | ( | ) | [inline, virtual] |
| LogCabin::RPC::Service::Service | ( | const Service & | ) |
| virtual void LogCabin::RPC::Service::handleRPC | ( | ServerRPC | serverRPC | ) | [pure virtual] |
This method is overridden by a subclass and invoked by the Server class when a new RPC arrives.
It should call ServerRPC::reply() or another method on the RPC to handle the request. The Server class calls this on a thread pool.
Implemented in LogCabin::RPC::ServiceMock, LogCabin::RPC::ThreadDispatchService, LogCabin::Server::ClientService, LogCabin::Server::ControlService, and LogCabin::Server::RaftService.
| virtual std::string LogCabin::RPC::Service::getName | ( | ) | const [pure virtual] |
Return a short name for this service which can be used in things like log messages.
Implemented in LogCabin::RPC::ServiceMock, LogCabin::RPC::ThreadDispatchService, LogCabin::Server::ClientService, LogCabin::Server::ControlService, and LogCabin::Server::RaftService.
1.7.6.1