Kanzi Connect  3.9.8
Kanzi Connect C++ API
kanzi::connect::PolicyContextInterface Class Referenceabstract

Policy context interface. More...

#include <policy_interface.hpp>

Inheritance diagram for kanzi::connect::PolicyContextInterface:

Public Member Functions

virtual bool acceptClientConnection (ConnectedClientSharedPtr client)=0
 Determines whether policy allows client connection to be accepted. More...
 
virtual bool acceptPluginLoading (const string &plugin)=0
 Invoked to check whether loading of a plugin is allowed. More...
 
virtual void addClient (ConnectedClientSharedPtr client)=0
 Adds a client reference into a collection of clients. More...
 
virtual PolicyControllerInterfaceSharedPtr getController ()=0
 Retrieve policy controller instance. More...
 
virtual void initialize (ConnectDomainSharedPtr domain)=0
 Optional two phased constructor (used when domain is not available construction time) More...
 
virtual bool registerClientMeasurements (DiagnosticsManagerSharedPtr diagnostics, ConnectedClientSharedPtr connectedClient)=0
 Register diagnostics values for service identified by connectedclient to be available for policies. More...
 
virtual void registerConnection (const string &interfaceId, ConnectedClientSharedPtr connectedClient)=0
 Register mapping between client and service. More...
 
virtual void registerDataToPolicy (string serviceName)=0
 
virtual void registerDataToPolicy (AbstractServiceSharedPtr service)=0
 
virtual void registerServerQueueRTSAccessors (WorkItemDispatcher *queue)=0
 Create the policy RTS accessors for message queues. More...
 
virtual bool registerServiceMeasurements (DiagnosticsManagerSharedPtr diagnostics, const string &interfaceid)=0
 Register diagnostics values for service named interfaceid to be available for policies. More...
 
virtual void removeClient (int clientId)=0
 Removes a client with specific client identifier. More...
 
virtual ~PolicyContextInterface ()
 Destructor. More...
 

Detailed Description

Policy context interface.

Constructor & Destructor Documentation

◆ ~PolicyContextInterface()

virtual kanzi::connect::PolicyContextInterface::~PolicyContextInterface ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ acceptClientConnection()

virtual bool kanzi::connect::PolicyContextInterface::acceptClientConnection ( ConnectedClientSharedPtr  client)
pure virtual

Determines whether policy allows client connection to be accepted.

Parameters
clientcontains information about connected client
Returns
true if connection is to be accepted.

◆ acceptPluginLoading()

virtual bool kanzi::connect::PolicyContextInterface::acceptPluginLoading ( const string &  plugin)
pure virtual

Invoked to check whether loading of a plugin is allowed.

Parameters
pluginthe 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.

◆ addClient()

virtual void kanzi::connect::PolicyContextInterface::addClient ( ConnectedClientSharedPtr  client)
pure virtual

Adds a client reference into a collection of clients.

ToDo: Consolidate with accept, no need for two methods !!

Parameters
clientthe client identifiers.

◆ getController()

virtual PolicyControllerInterfaceSharedPtr kanzi::connect::PolicyContextInterface::getController ( )
pure virtual

Retrieve policy controller instance.

Returns
policy controller instance.

◆ initialize()

virtual void kanzi::connect::PolicyContextInterface::initialize ( ConnectDomainSharedPtr  domain)
pure virtual

Optional two phased constructor (used when domain is not available construction time)

Parameters
domainconnect domain.

◆ registerClientMeasurements()

virtual bool kanzi::connect::PolicyContextInterface::registerClientMeasurements ( DiagnosticsManagerSharedPtr  diagnostics,
ConnectedClientSharedPtr  connectedClient 
)
pure virtual

Register diagnostics values for service identified by connectedclient to be available for policies.

Parameters
diagnosticsPointer to the diagnostics mechanism.
connectedClientPointer to the connecting client.
Returns
true on success

◆ registerConnection()

virtual void kanzi::connect::PolicyContextInterface::registerConnection ( const string &  interfaceId,
ConnectedClientSharedPtr  connectedClient 
)
pure virtual

Register mapping between client and service.

Parameters
interfaceIdThe name of the service to which to connect.
connectedClientPointer to the connecting client.

◆ registerDataToPolicy() [1/2]

virtual void kanzi::connect::PolicyContextInterface::registerDataToPolicy ( string  serviceName)
pure virtual

◆ registerDataToPolicy() [2/2]

virtual void kanzi::connect::PolicyContextInterface::registerDataToPolicy ( AbstractServiceSharedPtr  service)
pure virtual

◆ registerServerQueueRTSAccessors()

virtual void kanzi::connect::PolicyContextInterface::registerServerQueueRTSAccessors ( WorkItemDispatcher *  queue)
pure virtual

Create the policy RTS accessors for message queues.

◆ registerServiceMeasurements()

virtual bool kanzi::connect::PolicyContextInterface::registerServiceMeasurements ( DiagnosticsManagerSharedPtr  diagnostics,
const string &  interfaceid 
)
pure virtual

Register diagnostics values for service named interfaceid to be available for policies.

Parameters
diagnosticsPointer to the diagnostics mechanism.
interfaceidThe name of the interface, corresponds to service name.
Returns
true on success

◆ removeClient()

virtual void kanzi::connect::PolicyContextInterface::removeClient ( int  clientId)
pure virtual

Removes a client with specific client identifier.

ToDo: Should be symmetrical to adding new clients (i.e. shared ptr instead of token)

Parameters
clientIdthe client identifier to remove.

The documentation for this class was generated from the following file: