ContentAdapterManager¶
-
class
kanzi::connect::ContentAdapterManager¶ Abstract class to manage connection adapters.
Allows to start & stop new adapters and abstracts their lifetime management.
Subclassed by AbstractConnectDataSource, ContentAdapter
Public Types
-
typedef vector<ContentAdapterSharedPtr>
AdapterContainer¶
Public Functions
Constructor.
- Parameters
context: Gateway to content server.dataSource: The datasource instance which owns the ContentAdapterManager
-
ContentAdapterManager(DataSource *dataSource)¶ Constructor.
- Parameters
dataSource: The datasource instance which owns the ContentAdapterManager
-
~ContentAdapterManager() = default¶ dtor
Adds new adapter to list of adapters, but does not set up or start it.
- Parameters
adapter: Adapter to add.
Creates a standard adapter.
- Return
New adapter instance.
- Parameters
serverName: Identification of the server connection this content adapter belongs toconfig: Configuration for the new adapter.domain: UI domain.
-
void
destroyAllAdapters()¶ Stops and cleans up all adapters.
-
ContentAdapterSharedPtr
findDynamicSource(const string &name)¶ Locates a dynamic source with given name.
- Return
pointer to content adapter. Empty pointer if not found.
- Parameters
name: name used to lookup
-
ContentAdapterSharedPtr
findSource(const string &name)¶ Locates a source with given name.
- Return
pointer to content adapter. Empty pointer if not found.
- Parameters
name: name/uri used to lookup
-
ContentAdapterManager::AdapterContainer
getAdapters()¶ Retrieves all currently known adapters.
- Return
container full of adapters.
-
ContextSharedPtr
getContext() const¶ Returns gateway to Kanzi Connect server.
- Return
Kanzi Connect Context.
Initializes all adapters.
Removes adapter from list of adapters.
- Parameters
adapter: Adapter to remove.
Set gateway to Kanzi Connect server.
- Parameters
context: The context instance to set
Instantiates and starts new adapter according to given parameters.
- Return
New adapter instance that is up and running.
- Parameters
serverName: Identifies the server connection the adapter to start belongs toroot: Root of the data object tree where adapter is set up.config: Configuration for new adapter.
-
void
startAllAdapters()¶ Starts all adapters.
Stops an existing adapter.
- Parameters
adapter: Adapter to stop.
-
void
stopAllAdapters()¶ Stops all existing adapters.
-
typedef vector<ContentAdapterSharedPtr>