ADTF  3.14.3
IRPCObjectServerRegistryabstract

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

Inheritance diagram for IRPCObjectServerRegistry:
[legend]

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
 Retrieve the identifier of the protocol used. More...
 
virtual tResult GetRPCObjectServers (ucom::ant::iobject_enum< remote::ant::IRPCObjectServer > &lstObjects) const =0
 Retrieves a list of RPC objects registered. More...
 
virtual tResult RegisterRPCObjectServer (const char *strObjectName, const ucom::ant::iobject_ptr< remote::ant::IRPCObjectServer > &pObject)=0
 Registers a IRPCObjectServer implementation with the given name strObjectName to the registry. More...
 
virtual tResult UnregisterRPCObjectServer (const char *strObjectName)=0
 Unregisters the given name from the object registry. More...
 
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 IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 Marks the IObject to be castable with the ucom_cast() More...
 

Protected Member Functions

 ~IRPCObjectServerRegistry ()=default
 hidden DTOR
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

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.

Definition at line 91 of file rpc_object_server_registry_intf.h.

Member Function Documentation

◆ GetProtocol()

virtual tResult 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 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 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

◆ UnregisterRPCObjectServer()

virtual tResult 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

Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Jun 9 2022 by doxygen 1.9.1)