ADTF  3.18.2
cRPCObjectsRegistry

An RPC Server that receives calls via HTTP. More...

Inheritance diagram for cRPCObjectsRegistry:
[legend]

Classes

class  cLockedRPCObject
 Implements thread safe access to the rpc::IRPCObject object. More...
 

Public Types

typedef std::pair< std::unique_ptr< a_util::concurrency::shared_mutex >, IRPCObject * > tRPCItem
 Type granting thread safe access to an object of type rpc::IRPCObject.
 

Public Member Functions

virtual a_util::result::Result RegisterRPCObject (const char *strName, IRPCObject *pObject)
 Register an RPC object. More...
 
virtual a_util::result::Result UnregisterRPCObject (const char *strName)
 Unregisters an RPC object. More...
 
virtual cLockedRPCObject GetRPCObject (const char *strName) const
 Get thread safe rpc object access by the rpc objects name. More...
 

Private Types

typedef std::map< std::string, tRPCItemtRPCObjects
 

Private Attributes

a_util::concurrency::shared_mutex m_oObjectsLock
 
tRPCObjects m_oRPCObjects
 

Detailed Description

An RPC Server that receives calls via HTTP.

Definition at line 29 of file rpc_object_registry.h.

Member Function Documentation

◆ GetRPCObject()

virtual cLockedRPCObject GetRPCObject ( const char *  strName) const
virtual

Get thread safe rpc object access by the rpc objects name.

Parameters
[in]strNameName of the rpc object
Returns
The locked rpc object, might be empty if the name could not be looked up.

◆ RegisterRPCObject()

virtual a_util::result::Result RegisterRPCObject ( const char *  strName,
IRPCObject pObject 
)
virtual

Register an RPC object.

Parameters
[in]strNameThe name of the object.
[in]pObjectThe object.
Returns
Standard result.

Implements IRPCObjectsRegistry.

◆ UnregisterRPCObject()

virtual a_util::result::Result UnregisterRPCObject ( const char *  strName)
virtual

Unregisters an RPC object.

Parameters
[in]strNameThe name of the object.
Returns
Standard result.

Implements IRPCObjectsRegistry.