|
ADTF
|
#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! | |
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.
|
pure virtual |
Retrieve the identifier of the protocol used. The ADTF System Launcher will return "json".
| [in,out] | strProtocol | String where to return the protocol identifier to. |
|
pure virtual |
Retrieves a list of RPC objects registered.
| [in,out] | lstObjects | list of object where to push the object servers to (see also adtf::ucom::ant::object_list) |
| ERR_NOERROR |
|
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.
| [in] | strObjectName | name to register. |
| [in] | pObject | rpc server reference name to register. |
| ERR_NOERROR |
|
pure virtual |
Starts listening to the given url.
Implemented in adtf::services::bat::IRPCObjectServerRegistry.
|
pure virtual |
Unregisters the given name from the object registry.
| [in] | strObjectName | name to unregister. |
| ERR_NOERROR | |
| ERR_NOT_FOUND |