MIRA
Public Member Functions | List of all members
AbstractRPCHandler Class Referenceabstract

Abstract interface for derived RPCHandler(s). More...

#include <rpc/AbstractRPCHandler.h>

Inheritance diagram for AbstractRPCHandler:
Inheritance graph
[legend]

Public Member Functions

virtual ~AbstractRPCHandler ()
 
virtual void queueRequest (AbstractDeferredInvokerPtr invoker)=0
 Queues a new request that is given as AbstractDeferredInvokerPtr. More...
 
virtual boost::thread::id getThreadID () const =0
 Should return the thread id of the thread that processes the rpc requests. More...
 

Detailed Description

Abstract interface for derived RPCHandler(s).

The actual derived RPCHandler should manage an internal list of pending requests. Additionally, the RPCHandler usually will have its own thread for processing those pending requests. The requests are given as AbstractDeferredInvokerPtr. They can be processed by calling the AbstractDeferredInvoker::invoke() method.

Constructor & Destructor Documentation

◆ ~AbstractRPCHandler()

virtual ~AbstractRPCHandler ( )
inlinevirtual

Member Function Documentation

◆ queueRequest()

virtual void queueRequest ( AbstractDeferredInvokerPtr  invoker)
pure virtual

Queues a new request that is given as AbstractDeferredInvokerPtr.

The actual requests can be invoked by calling

Implemented in RPCHandler.

◆ getThreadID()

virtual boost::thread::id getThreadID ( ) const
pure virtual

Should return the thread id of the thread that processes the rpc requests.

The RPCManager uses this thread id to determine, if a rpc call is requested within the same thread that is used to process it. In order to avoid deadlocks the rpc method is directly called in this case, instead of calling queueRequest().

Implemented in RPCHandler.


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