Encapsulates service runtime data. More...
#include <serviceruntimedataregisterer.hpp>
Public Types | |
| typedef shared_ptr< void > | ContentRegistrationToken |
| typedef shared_ptr< void > | ContentSubscriptionToken |
| typedef function< void(const string &, const string &)> | RuntimeContentUpdateCallback |
Public Member Functions | |
| RuntimeDataObjectSharedPtr | getRootObjectForRegistration (ContentRegistrationToken token) |
| Retrieves the root object associated with the specific content registration token. More... | |
| RuntimeDataObjectSharedPtr | getRootObjectForSubscription (ContentSubscriptionToken token) |
| Retrieves the root object associated with the specific content listener token. More... | |
| const string | getSchemaForSubscription (ContentSubscriptionToken token) |
| Retrieve XML format schema for content subscription. More... | |
| void | initializeHTTP () |
| Initializes HTTP Functionality. More... | |
| ContentSubscriptionToken | registerContentListener (const string &path, RuntimeContentUpdateCallback callback) |
| Registers runtime content listener to a specific path. More... | |
| ContentRegistrationToken | registerContentProducer (const string &servicename, RuntimeDataObjectSharedPtr dataRoot, const string &schema) |
| Registers a content producer, aka a service. More... | |
| ContentRegistrationToken | registerContentProducer (const string &servicename, const string &xml) |
| Registers a content producer from XML schema definition. More... | |
| bool | renameContentProducer (const string &oldname, const string &newname) |
| Renames a content producer. More... | |
| ServiceRuntimeDataRegistry (ConnectDomain *domain=nullptr, DiagnosticsManagerSharedPtr diagnostics=DiagnosticsManagerSharedPtr()) | |
| C++ constructor. More... | |
| void | uninitializeHTTP () |
| Uninitialize HTTP Functionality. More... | |
| void | unregisterContentListener (ContentSubscriptionToken token) |
| Unregisters content listener. More... | |
| void | unregisterContentProducer (ContentRegistrationToken handle) |
| Unregister content producer. More... | |
| bool | updateData (ContentRegistrationToken handle, const string &stream, const string &path) |
| Updates the data of a specific registration. More... | |
| bool | updateDataForPath (ContentRegistrationToken handle, const string &path) |
| Updates the data of specific registration and especially a specified path within it. More... | |
| ContentRegistrationToken | updateSchema (ContentRegistrationToken token, RuntimeDataObjectSharedPtr dataRoot, const string &schema) |
| Changes the runtime data schema. More... | |
| ServiceRuntimeDataRegistry::ContentRegistrationToken | updateSchema (ContentRegistrationToken token, const string &schema) |
| Updates the schema at runtime. More... | |
Public Member Functions inherited from kanzi::connect::VirtualFileProvider | |
| virtual void | cancelAllPendingRequests () |
| virtual | ~VirtualFileProvider () |
| Virtual destructor for cleanup. More... | |
Public Attributes | |
| bool | m_active |
| True if data should be distributed. More... | |
| DiagnosticsManagerSharedPtr | m_diagnostics |
| Diagnostics manager. More... | |
| ConnectDomain * | m_domain |
| The domain. More... | |
| VirtualFileLocalClientSharedPtr | m_HTTPClient |
| HTTP Client for HTTP Communications. More... | |
| VirtualFileClient::RegistrationToken | m_HTTPSchemaToken |
| HTTP Schema token. More... | |
| VirtualFileClient::RegistrationToken | m_HTTPToken |
| HTTP registration token. More... | |
Protected Member Functions | |
| virtual void | provideFile (const string &path, VirtualFileResponseSharedPtr response) KZ_OVERRIDE |
| Invoked when there is a requirement to provide a file. More... | |
Encapsulates service runtime data.
| typedef shared_ptr<void> kanzi::connect::ServiceRuntimeDataRegistry::ContentRegistrationToken |
| typedef shared_ptr<void> kanzi::connect::ServiceRuntimeDataRegistry::ContentSubscriptionToken |
| typedef function<void(const string&, const string&)> kanzi::connect::ServiceRuntimeDataRegistry::RuntimeContentUpdateCallback |
| kanzi::connect::ServiceRuntimeDataRegistry::ServiceRuntimeDataRegistry | ( | ConnectDomain * | domain = nullptr, |
| DiagnosticsManagerSharedPtr | diagnostics = DiagnosticsManagerSharedPtr() |
||
| ) |
C++ constructor.
| domain | the connect domain (optional) |
| diagnostics | diagnostics functionality for traffic logging etc. |
| RuntimeDataObjectSharedPtr kanzi::connect::ServiceRuntimeDataRegistry::getRootObjectForRegistration | ( | ContentRegistrationToken | token | ) |
Retrieves the root object associated with the specific content registration token.
| token | the content registration token |
| RuntimeDataObjectSharedPtr kanzi::connect::ServiceRuntimeDataRegistry::getRootObjectForSubscription | ( | ContentSubscriptionToken | token | ) |
Retrieves the root object associated with the specific content listener token.
| token | the token to query |
| const string kanzi::connect::ServiceRuntimeDataRegistry::getSchemaForSubscription | ( | ContentSubscriptionToken | token | ) |
Retrieve XML format schema for content subscription.
| token | identifies the subscription |
| void kanzi::connect::ServiceRuntimeDataRegistry::initializeHTTP | ( | ) |
Initializes HTTP Functionality.
Must be called after HTTP Functionality itself has been initialized.
|
protectedvirtual |
Invoked when there is a requirement to provide a file.
| path | requested path. |
| response | the response object that is to be completed within the callback. Object must not be stored by called entity. |
Implements kanzi::connect::VirtualFileProvider.
| ContentSubscriptionToken kanzi::connect::ServiceRuntimeDataRegistry::registerContentListener | ( | const string & | path, |
| RuntimeContentUpdateCallback | callback | ||
| ) |
Registers runtime content listener to a specific path.
| path | where to register. |
| ContentRegistrationToken kanzi::connect::ServiceRuntimeDataRegistry::registerContentProducer | ( | const string & | servicename, |
| RuntimeDataObjectSharedPtr | dataRoot, | ||
| const string & | schema | ||
| ) |
Registers a content producer, aka a service.
| servicename | The name of the service. |
| dataRoot | The root object. |
| ContentRegistrationToken kanzi::connect::ServiceRuntimeDataRegistry::registerContentProducer | ( | const string & | servicename, |
| const string & | xml | ||
| ) |
Registers a content producer from XML schema definition.
This is used with remote services.
| servicename | name of the service |
| xml | xml contents |
| bool kanzi::connect::ServiceRuntimeDataRegistry::renameContentProducer | ( | const string & | oldname, |
| const string & | newname | ||
| ) |
Renames a content producer.
Required for example by simulator when service models name is changed
| oldname | the old name. |
| newname | the new name. |
| void kanzi::connect::ServiceRuntimeDataRegistry::uninitializeHTTP | ( | ) |
Uninitialize HTTP Functionality.
| void kanzi::connect::ServiceRuntimeDataRegistry::unregisterContentListener | ( | ContentSubscriptionToken | token | ) |
Unregisters content listener.
| token | what to unregister. |
| void kanzi::connect::ServiceRuntimeDataRegistry::unregisterContentProducer | ( | ContentRegistrationToken | handle | ) |
Unregister content producer.
| handle | the handle of operation |
| bool kanzi::connect::ServiceRuntimeDataRegistry::updateData | ( | ContentRegistrationToken | handle, |
| const string & | stream, | ||
| const string & | path | ||
| ) |
Updates the data of a specific registration.
| handle | identifies the updated, earlier returned by registerContentProducer |
| stream | the serialized update content. |
| path | the path that was reported to be changed. |
| bool kanzi::connect::ServiceRuntimeDataRegistry::updateDataForPath | ( | ContentRegistrationToken | handle, |
| const string & | path | ||
| ) |
Updates the data of specific registration and especially a specified path within it.
| handle | identifies the updated, earlier returned by registerContentProducer |
| path | the path that changed. |
| ContentRegistrationToken kanzi::connect::ServiceRuntimeDataRegistry::updateSchema | ( | ContentRegistrationToken | token, |
| RuntimeDataObjectSharedPtr | dataRoot, | ||
| const string & | schema | ||
| ) |
Changes the runtime data schema.
| token | the token that identifies the previously registered content producer |
| dataRoot | the root object. |
| schema | the xml schema that defines the new structure. |
| ServiceRuntimeDataRegistry::ContentRegistrationToken kanzi::connect::ServiceRuntimeDataRegistry::updateSchema | ( | ContentRegistrationToken | token, |
| const string & | schema | ||
| ) |
Updates the schema at runtime.
| token | identifies the content registration |
| schema | new xml definition of the data |
| bool kanzi::connect::ServiceRuntimeDataRegistry::m_active |
True if data should be distributed.
| DiagnosticsManagerSharedPtr kanzi::connect::ServiceRuntimeDataRegistry::m_diagnostics |
Diagnostics manager.
| ConnectDomain* kanzi::connect::ServiceRuntimeDataRegistry::m_domain |
The domain.
| VirtualFileLocalClientSharedPtr kanzi::connect::ServiceRuntimeDataRegistry::m_HTTPClient |
HTTP Client for HTTP Communications.
| VirtualFileClient::RegistrationToken kanzi::connect::ServiceRuntimeDataRegistry::m_HTTPSchemaToken |
HTTP Schema token.
| VirtualFileClient::RegistrationToken kanzi::connect::ServiceRuntimeDataRegistry::m_HTTPToken |
HTTP registration token.