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
-
explicit
ContentAdapterManager(DataSource *dataSource)¶ Constructor.
- Parameters
dataSource – The datasource instance which owns the ContentAdapterManager
-
virtual
~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.
- Parameters
serverName – Identification of the server connection this content adapter belongs to
config – Configuration for the new adapter.
domain – UI domain.
- Returns
New adapter instance.
-
void
destroyAllAdapters()¶ Stops and cleans up all adapters.
-
ContentAdapterSharedPtr
findDynamicSource(const string &name)¶ Locates a dynamic source with given name.
- Parameters
name – name used to lookup
- Returns
pointer to content adapter. Empty pointer if not found.
-
ContentAdapterSharedPtr
findSource(const string &name)¶ Locates a source with given name.
- Parameters
name – name/uri used to lookup
- Returns
pointer to content adapter. Empty pointer if not found.
-
ContentAdapterManager::AdapterContainer
getAdapters()¶ Retrieves all currently known adapters.
- Returns
container full of adapters.
-
ContextSharedPtr
getContext() const¶ Returns gateway to Kanzi Connect server.
- Returns
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.
- Parameters
serverName – Identifies the server connection the adapter to start belongs to
root – Root of the data object tree where adapter is set up.
config – Configuration for new adapter.
- Returns
New adapter instance that is up and running.
-
void
startAllAdapters()¶ Starts all adapters.
Stops an existing adapter.
- Parameters
adapter – Adapter to stop.
-
void
stopAllAdapters()¶ Stops all existing adapters.
-
typedef vector<ContentAdapterSharedPtr>