LogCabin
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
LogCabin::RPC::Service Class Reference

Base class for RPC services. More...

#include <Service.h>

Inheritance diagram for LogCabin::RPC::Service:
LogCabin::RPC::ServiceMock LogCabin::RPC::ThreadDispatchService LogCabin::Server::ClientService LogCabin::Server::ControlService LogCabin::Server::RaftService

List of all members.

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 &)
Serviceoperator= (const Service &)

Detailed Description

Base class for RPC services.

Each service handles a related set of RPCs from clients.

Definition at line 29 of file Service.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 34 of file Service.h.

virtual LogCabin::RPC::Service::~Service ( ) [inline, virtual]

Destructor.

Definition at line 39 of file Service.h.


Member Function Documentation

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.

Service& LogCabin::RPC::Service::operator= ( const Service )

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines