ExternalServiceAdapter¶
-
class
kanzi::connect::ExternalServiceAdapter: public AbstractService¶ Adapter class between Java implemented services and AbstractService instance.
Unnamed Group
-
GenericInvoker *
getGenericInvoker() override¶ - See
kanzi::connect::connect::AbstractService
-
AbstractSessionSharedPtr
onAcquireSession(int clientId, int sessionId, MessageDispatcher *dispatcher, const string &instanceName) override¶ Session factorization method interface.
To be overrided by concrete services
- Return
newly allocated session. ownership is transfered.
- Parameters
clientId: client identifier numbersessionId: session identifier numberdispatcher: message dispatching functionality for the session.instanceName: name for the service/session instance
-
ContentProviderCollectionSharedPtr
getContentProvider() override¶ Returns content provider for this service.
- Return
Collection of content providers, created by this service.
-
string
getIdentifier() const override¶
Virtual method that inheriting classes can implement.
Can be used to receive notifications when sessions are destroyed.
- Parameters
session: identifies the session to be released. ownership not transfered.
Unnamed Group
- See
kanzi::connect::connect::AbstractService
-
bool
hasSubscriptionsExt(const string &identifier)¶
-
vector<shared_ptr<ExternalServiceSession>>
findSubscribersExt(const string &identifier)¶
Public Functions
-
ExternalServiceAdapter(const string &identfier)¶ Constructor.
- Parameters
identfier: the name of the service this adapter represents.
-
~ExternalServiceAdapter() override¶ Destructor.
Invoked to receive incoming message.
This is handled in external code (Java etc)
- Parameters
message: the message to be processed.
-
void
transmitToAll(const MessagePackage &message)¶ Transmits a provided message to wire and delivers it to all sessions available.
- Parameters
message: the message to be sent.
Transmits a provided message to specific session.
- Parameters
session: the session where to send to message. Session presence is verified before making the call.message: the message to be sent.
-
GenericInvoker *