Domain definition for Kanzi Connect.
More...
#include <connectdomain.hpp>
Domain definition for Kanzi Connect.
◆ ConnectDomain()
kanzi::connect::ConnectDomain::ConnectDomain |
( |
| ) |
|
◆ ~ConnectDomain()
kanzi::connect::ConnectDomain::~ConnectDomain |
( |
| ) |
|
◆ cancelTimer()
void kanzi::connect::ConnectDomain::cancelTimer |
( |
int64_t | handle | ) |
|
Cancel running timer.
- Parameters
-
◆ create() [1/3]
Creates a default domain instance without configuration file.
This creates a stub server without any services or outgoing bearers so not much functional
- Returns
- newly allocated connect domain
◆ create() [2/3]
Creates an instance of connect domain.
- Parameters
-
configurationFile | the configuration file for server. |
- Returns
- connect domain instance.
◆ create() [3/3]
Creates an instance of connect domain.
- Parameters
-
fileset | set of configuration files passed during the construction |
- Returns
- connect domain instance.
◆ createForClient()
static ConnectDomainSharedPtr kanzi::connect::ConnectDomain::createForClient |
( |
const string | configurationFile = string() | ) |
|
|
static |
Creates a reduced connect domain object to be used on client side.
- Parameters
-
configurationFile | optional configuration filename to be used to initialize for example policy functionality. |
- Returns
- newly allocation connect domain instance.
◆ getClientRemoteServiceHostInterface()
Retrieve remote service host interface.
- Returns
- pointer to remote service host interface. nullptr if run in context where its not available.
◆ getModule()
ModuleSharedPtr kanzi::connect::ConnectDomain::getModule |
( |
const string & | name | ) |
|
Lookup module by name.
- Parameters
-
name | the name of the module |
- Returns
- shared pointer to module with the name
◆ getObjectFactory()
ObjectFactory * kanzi::connect::ConnectDomain::getObjectFactory |
( |
| ) |
const |
Retrieve object factory instance.
- Returns
- pointer to object factory. ownership not transfered.
◆ getPolicyContext()
Return the policy context object.
- Returns
- pointer to policy context. ownership not transfered.
◆ getSecurityContext()
Return the security context object.
- Returns
- pointer to security context. ownership not transfered.
◆ getServerConfig()
ServerConfig * kanzi::connect::ConnectDomain::getServerConfig |
( |
| ) |
|
Get server configuration handler.
- Returns
- pointer to server configuration. ownership not transfered.
◆ getServerState()
ServerState * kanzi::connect::ConnectDomain::getServerState |
( |
| ) |
|
Get server state handler.
- Returns
- pointer to server state. ownership not transfered.
◆ getServiceLookup()
Retrieve the interface used to perform service lookup.
- Returns
- pointer to functionality that can be used to discover service within the local system.
◆ getWebSocketContext()
Return the websocket context object.
- Returns
- pointer to websocket context. ownership not transfered.
◆ loadModule()
bool kanzi::connect::ConnectDomain::loadModule |
( |
const string & | modulename | ) |
|
Loads a dynamic module from library.
- Parameters
-
modulename | base for library name. No extension (libXXX.so, .dll) allowed.. |
- Returns
- true if successfully loaded, false if some error determined.
◆ registerModule()
template<class _TModuleType >
bool kanzi::connect::ConnectDomain::registerModule |
( |
const string & | name | ) |
|
|
inline |
Template method to register a typed module into the system.
- Parameters
-
name | the name of the module to register |
- Returns
- true if registration successful, false on error.
◆ setClientRemoteServiceHostInterface()
Configure remoteservicehost interface.
- Parameters
-
rshInterface | the interface to register. |
◆ setServiceLookupInterface()
Configure service lookup interface.
- Parameters
-
lookupInterface | the service lookup interface. |
◆ setTimer()
Schedules an executable object to be run in future.
Execution conext for the executable is such that it is allowed to use any kanzi connect API's from it.
- Parameters
-
ms | timeout after which the executable is launched. Passing <= 0 indicates that object should be executed as soon as possible. |
executable | executable object that is to be invoked. |
- Returns
- handle to timer. This handle is valid (valid if != 0) if timeout is provided and can be used to cancel the object later on.
domain->setTimer(0, [](){ printf("Hey!\n"); });
◆ setWorkDispatcher()
Configure work item dispatcher to the domain.
- Parameters
-
dispatcher | work item dispatcher. |
◆ unloadModule()
bool kanzi::connect::ConnectDomain::unloadModule |
( |
const string & | modulename | ) |
|
Unloads a dynamic module from library.
- Parameters
-
modulename | base for library name. No extension (libXXX.so, .dll) allowed.. |
- Returns
- true if successfully unloaded, false if some error determined.
The documentation for this class was generated from the following file:
- connect/connectdomain.hpp