ADTF
Loading...
Searching...
No Matches
adtf::services::ant::IRPCObjectServerRegistry Class Referenceabstract

#include <rpc_object_server_registry_intf.h>

Inherits adtf::ucom::ant::IObject.

Inherited by adtf::services::bat::IRPCObjectServerRegistry.

Public Member Functions

 ADTF_IID (IRPCObjectServerRegistry, "rpc_object_server_registry.ant.services.adtf.iid")
 interface identifier
 
virtual tResult GetProtocol (base::ant::IString &&strProtocol) const =0
 
virtual tResult GetRPCObjectServers (ucom::ant::iobject_enum< remote::ant::IRPCObjectServer > &lstObjects) const =0
 
virtual tResult RegisterRPCObjectServer (const char *strObjectName, const ucom::ant::iobject_ptr< remote::ant::IRPCObjectServer > &pObject)=0
 
virtual tResult UnregisterRPCObjectServer (const char *strObjectName)=0
 
virtual tResult StartListening ()=0
 Starts listening to the given url.
 
virtual tResult StopListening ()=0
 Stops listening. No messages will be forwarded.
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Protected Member Functions

 ~IRPCObjectServerRegistry ()=default
 hidden DTOR
 
- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

The Object Server Registry is a single instance to create a single adress entry for RPC Server Objects.

The registered object by RegisterRPCObjectServer will be reached via the same adress as the registry itselve. Within the ADTF System Launcher the communication is a simple JSON protocol: The registry is implemented as a json server by the given URL like http://localhost:8000. Each Server object is reachable by a URL like http://localhost:8000/<objectname> given at strObjectName.

Member Function Documentation

◆ GetProtocol()

virtual tResult adtf::services::ant::IRPCObjectServerRegistry::GetProtocol ( base::ant::IString && strProtocol) const
pure virtual

Retrieve the identifier of the protocol used. The ADTF System Launcher will return "json".

Parameters
[in,out]strProtocolString where to return the protocol identifier to.
Returns
returns the error code of the adtf::base::ant::IString::Set method

◆ GetRPCObjectServers()

virtual tResult adtf::services::ant::IRPCObjectServerRegistry::GetRPCObjectServers ( ucom::ant::iobject_enum< remote::ant::IRPCObjectServer > & lstObjects) const
pure virtual

Retrieves a list of RPC objects registered.

Parameters
[in,out]lstObjectslist of object where to push the object servers to (see also adtf::ucom::ant::object_list)
See also
RegisterRPCObjectServer, UnregisterRPCObjectServer, adtf::ucom::ant::object_list.
Return values
ERR_NOERROR

◆ RegisterRPCObjectServer()

virtual tResult adtf::services::ant::IRPCObjectServerRegistry::RegisterRPCObjectServer ( const char * strObjectName,
const ucom::ant::iobject_ptr< remote::ant::IRPCObjectServer > & pObject )
pure virtual

Registers a IRPCObjectServer implementation with the given name strObjectName to the registry. It depends on the protocol used how the registry will handle the name. The ADTF System Launcher will handle the name to forward the incoming RPC calles to the server implementation of adtf::remote::ant::IRPCObjectServer::Receive method and extends the URL address to http://localhost:8000/<objectname>.

The name has to be unique within one registry instance.

Parameters
[in]strObjectNamename to register.
[in]pObjectrpc server reference name to register.
See also
GetProtocol, UnregisterRPCObjectServer, adtf::remote::ant::IRPCObjectServer
Return values
ERR_NOERROR

◆ StartListening()

virtual tResult adtf::services::ant::IRPCObjectServerRegistry::StartListening ( )
pure virtual

Starts listening to the given url.

Implemented in adtf::services::bat::IRPCObjectServerRegistry.

◆ UnregisterRPCObjectServer()

virtual tResult adtf::services::ant::IRPCObjectServerRegistry::UnregisterRPCObjectServer ( const char * strObjectName)
pure virtual

Unregisters the given name from the object registry.

Parameters
[in]strObjectNamename to unregister.
See also
GetProtocol, RegisterRPCObjectServer, adtf::remote::ant::IRPCObjectServer
Return values
ERR_NOERROR
ERR_NOT_FOUND

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