MIRA
Public Member Functions | Protected Attributes | List of all members
RPCServer::DeferredInvoker< Backend > Class Template Reference

Stores all necessary information to invoke a previously decoded and prepared RPC call. More...

#include <rpc/RPCServer.h>

Inheritance diagram for RPCServer::DeferredInvoker< Backend >:
Inheritance graph
[legend]

Public Member Functions

 DeferredInvoker (typename Backend::ServerRequest &request, typename Backend::ServerResponse &response, const std::string &callId, const std::string &service, const std::string &method, boost::shared_ptr< TRPCInvoker< Backend >> invoker)
 
virtual void invoke ()
 Invokes the RPC call that is represented by this DeferredInvoker. More...
 
const std::string & getCallId () const
 Returns the unique ID of the RPC call that is about to be invoked by this invoker. More...
 
void setFinishHandler (DeferredInvokerFinishHandler *handler)
 Sets a handler that is called after the RPC call was invoked and has finished. More...
 
const std::string & getServiceName () const
 Returns the name of the service where the method is invoked. More...
 
const std::string & getMethodName () const
 Returns the name of the method that is invoked. More...
 

Protected Attributes

std::string mCallId
 
std::string mServiceName
 
std::string mMethodName
 
DeferredInvokerFinishHandlermFinishHandler
 

Detailed Description

template<typename Backend>
class mira::RPCServer::DeferredInvoker< Backend >

Stores all necessary information to invoke a previously decoded and prepared RPC call.

The call itself is decoded and prepared in processCallDeferred() which returns the DeferredInvoker. Afterwards, the DeferredInvoker object can be stored and used to execute that call when appropriate at any time.

Constructor & Destructor Documentation

◆ DeferredInvoker()

DeferredInvoker ( typename Backend::ServerRequest &  request,
typename Backend::ServerResponse &  response,
const std::string &  callId,
const std::string &  service,
const std::string &  method,
boost::shared_ptr< TRPCInvoker< Backend >>  invoker 
)
inline

Member Function Documentation

◆ invoke()

virtual void invoke ( )
inlinevirtual

Invokes the RPC call that is represented by this DeferredInvoker.

Implements AbstractDeferredInvoker.

◆ getCallId()

const std::string& getCallId ( ) const
inlineinherited

Returns the unique ID of the RPC call that is about to be invoked by this invoker.

◆ setFinishHandler()

void setFinishHandler ( DeferredInvokerFinishHandler handler)
inlineinherited

Sets a handler that is called after the RPC call was invoked and has finished.

◆ getServiceName()

const std::string& getServiceName ( ) const
inlineinherited

Returns the name of the service where the method is invoked.

◆ getMethodName()

const std::string& getMethodName ( ) const
inlineinherited

Returns the name of the method that is invoked.

Member Data Documentation

◆ mCallId

std::string mCallId
protectedinherited

◆ mServiceName

std::string mServiceName
protectedinherited

◆ mMethodName

std::string mMethodName
protectedinherited

◆ mFinishHandler

DeferredInvokerFinishHandler* mFinishHandler
protectedinherited

The documentation for this class was generated from the following file: