PolicyContextInterface¶
-
class
kanzi::connect
::
PolicyContextInterface
: public MetaObject¶ Policy context interface.
Public Functions
-
~PolicyContextInterface
()¶ Destructor.
Determines whether policy allows client connection to be accepted.
- Return
true if connection is to be accepted.
- Parameters
client
: contains information about connected client
-
bool
acceptPluginLoading
(const string &plugin) = 0¶ Invoked to check whether loading of a plugin is allowed.
- Return
true if plugin loading should be allowed. false if not. Plugin loading might be disallowed for example because plugin signature mismatch.
- Parameters
plugin
: the plugin that is to be loaded. This might be relative or absolute path to the plugin
Adds a client reference into a collection of clients.
ToDo: Consolidate with accept, no need for two methods !!
- Parameters
client
: the client identifiers.
-
PolicyControllerInterfaceSharedPtr
getController
() = 0¶ Retrieve policy controller instance.
- Return
policy controller instance.
Optional two phased constructor (used when domain is not available construction time)
- Parameters
domain
: connect domain.
Register diagnostics values for service identified by connectedclient to be available for policies.
- Return
true on success
- Parameters
diagnostics
: Pointer to the diagnostics mechanism.connectedClient
: Pointer to the connecting client.
Register mapping between client and service.
- Parameters
interfaceId
: The name of the service to which to connect.connectedClient
: Pointer to the connecting client.
-
void
registerDataToPolicy
(string serviceName) = 0¶
-
void
registerServerQueueRTSAccessors
(WorkItemDispatcher *queue) = 0¶ Create the policy RTS accessors for message queues.
Register diagnostics values for service named interfaceid to be available for policies.
- Return
true on success
- Parameters
diagnostics
: Pointer to the diagnostics mechanism.interfaceid
: The name of the interface, corresponds to service name.
-
void
removeClient
(int clientId) = 0¶ Removes a client with specific client identifier.
ToDo: Should be symmetrical to adding new clients (i.e. shared ptr instead of token)
- Parameters
clientId
: the client identifier to remove.
-