PolicyContextInterface¶
-
class
kanzi::connect
::
PolicyContextInterface
: public MetaObject¶ Policy context interface.
Public Functions
-
inline virtual
~PolicyContextInterface
()¶ Destructor.
Determines whether policy allows client connection to be accepted.
- Parameters
client – contains information about connected client
- Returns
true if connection is to be accepted.
-
virtual bool
acceptPluginLoading
(const string &plugin) = 0¶ Invoked to check whether loading of a plugin is allowed.
- Parameters
plugin – the plugin that is to be loaded. This might be relative or absolute path to the plugin
- Returns
true if plugin loading should be allowed. false if not. Plugin loading might be disallowed for example because plugin signature mismatch.
Adds a client reference into a collection of clients.
ToDo: Consolidate with accept, no need for two methods !!
- Parameters
client – the client identifiers.
-
virtual PolicyControllerInterfaceSharedPtr
getController
() = 0¶ Retrieve policy controller instance.
- Returns
policy controller instance.
-
virtual void
initialize
(ConnectDomain *domain) = 0¶ 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.
- Parameters
diagnostics – Pointer to the diagnostics mechanism.
connectedClient – Pointer to the connecting client.
- Returns
true on success
Register mapping between client and service.
- Parameters
interfaceId – The name of the service to which to connect.
connectedClient – Pointer to the connecting client.
-
virtual void
registerDataToPolicy
(string serviceName) = 0¶
-
virtual 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.
- Parameters
diagnostics – Pointer to the diagnostics mechanism.
interfaceid – The name of the interface, corresponds to service name.
- Returns
true on success
-
virtual 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.
-
inline virtual