Kanzi Connect 3.9.10
kanzi::connect::ExternalClientInterface Class Reference

#include <externalclientadapter.hpp>

Inheritance diagram for kanzi::connect::ExternalClientInterface:
kanzi::connect::InterfaceClient< InterfaceObserver, ExternalClientSession > kanzi::connect::AbstractInterfaceClient

Public Member Functions

void addInterface ()
 Second phase of initialization forced by shared_from_this. Add interface to the client.
 
 ExternalClientInterface (Client &client, const string &identifier)
 Constructor.
 
void onReleaseSession (AbstractSessionSharedPtr session)
 Function that allows derived classes to destroy their type-specific session instance.
 
 ~ExternalClientInterface ()
 Destructor Removes interface from the client.
 
- Public Member Functions inherited from kanzi::connect::InterfaceClient< InterfaceObserver, ExternalClientSession >
AbstractSessionSharedPtr acquireSession (MessageDispatcher *dispatcher)
 Acquire session in to this interface.
 
void addObserver (AbstractSessionSharedPtr session, InterfaceObserver *observer)
 Add observer in to this interface for given session.
 
RPCCallStoregetCallStore ()
 Retrieve RPC call store that is used to manage pending RPC calls.
 
virtual string getIdentifier () const
 Returns the type id of the interface.
 
InterfaceObservergetObserver (AbstractSessionSharedPtr session)
 Retrieve observer for given session.
 
 InterfaceClient (const string &identifier, RPCCallStore &callstore)
 
virtual AbstractSessionSharedPtr onAcquireSession (int sessionId, MessageDispatcher *dispatcher)
 Function that allows derived classes to create their type-specific session instance.
 
virtual void receive (const MessagePackage &message)
 Pass a message package to this interface, resolves proper session and makes it receive the package.
 
void releaseSession (AbstractSessionSharedPtr session)
 Release session that is connected to this interface.
 
void removeObserver (AbstractSessionSharedPtr session)
 Remove observer from a given session.
 
- Public Member Functions inherited from kanzi::connect::AbstractInterfaceClient
 AbstractInterfaceClient (RPCCallStore &callStore)
 Constructor.
 
AbstractSessionSharedPtr acquireAbstractSession (MessageDispatcher *dispatcher)
 Acquires a session for this interface.
 
shared_ptr< p2p::RoutingRulesgetRoutingRules ()
 Retrieve routing rules for this particular client.
 
AbstractSessionSharedPtr getSession (int sessionId)
 Returns session by id.
 
bool isSessionRunning (AbstractSessionSharedPtr session) const
 Check if the given session is running or not.
 
void notifyServiceReachable (bool reachable)
 Invoked to notify clients whether specific service is reachable or not.
 
virtual void registerRemoteInterface (MessageTranslator *translator)
 Registers this interface to given message translator.
 
void releaseAbstractSession (AbstractSessionSharedPtr session)
 Releases given session from this interface.
 
bool serviceReachable () const
 Is service currently known to be reachable.
 
void setClient (ClientSharedPtr client)
 Stores the client this interface is bound to.
 
void setServiceReachableCallback (ServiceReachableCallback callback)
 Registers service reachable callback.
 
void setSessionRunning (AbstractSessionSharedPtr session)
 Set the given session to running state.
 
void setSessionStopped (AbstractSessionSharedPtr session)
 Set the given session to stopped state.
 
void stopAllSessions ()
 Ends all sessions since maybe the service itself has disappeared.
 
void terminateAllSessions ()
 Terminates all ongoing sessions.
 
virtual ~AbstractInterfaceClient ()
 Destructor.
 

Additional Inherited Members

- Public Types inherited from kanzi::connect::InterfaceClient< InterfaceObserver, ExternalClientSession >
typedef map< AbstractSessionSharedPtr, InterfaceObserver * > ObserverContainer
 Type definition for observer container.
 
- Public Types inherited from kanzi::connect::AbstractInterfaceClient
typedef function< void(bool)> ServiceReachableCallback
 Callback to inform whether service at server is available or not.
 
- Protected Attributes inherited from kanzi::connect::InterfaceClient< InterfaceObserver, ExternalClientSession >
string m_identifier
 
- Protected Attributes inherited from kanzi::connect::AbstractInterfaceClient
RPCCallStorem_callStore
 

Constructor & Destructor Documentation

◆ ExternalClientInterface()

kanzi::connect::ExternalClientInterface::ExternalClientInterface ( Client & client,
const string & identifier )

Constructor.

Parameters
clientthe client this interface is bound to
identifierthe identifier of the service this generic client interface is bound to.

◆ ~ExternalClientInterface()

kanzi::connect::ExternalClientInterface::~ExternalClientInterface ( )

Destructor Removes interface from the client.

Member Function Documentation

◆ addInterface()

void kanzi::connect::ExternalClientInterface::addInterface ( )

Second phase of initialization forced by shared_from_this. Add interface to the client.

◆ onReleaseSession()

void kanzi::connect::ExternalClientInterface::onReleaseSession ( AbstractSessionSharedPtr session)
virtual

Function that allows derived classes to destroy their type-specific session instance.

Parameters
sessionSession to release.

Reimplemented from kanzi::connect::AbstractInterfaceClient.


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