#include <Connectivity_SessionInterface.h>
SessionInterface class which contains all the methods and callbacks for each of the session created.
◆ SessionInterface()
com::apama::session::SessionInterface::SessionInterface |
( |
Logger & |
logger | ) |
|
SessionInterface constructor which takes connectivity plugin transport/codec's logger object.
Adapter user should create different sessionInterface instance for different sessions.
- Parameters
-
logger | Logger instance of connectivity plugin transport/codec. |
◆ AddCapabilities()
virtual void com::apama::session::SessionInterface::AddCapabilities |
( |
Capability & |
capability | ) |
|
|
virtual |
AddSessionParams method
Adapter user should add all the capability of a session using this method
- Parameters
-
◆ AddSessionParams()
virtual void com::apama::session::SessionInterface::AddSessionParams |
( |
SessionParam & |
param | ) |
|
|
virtual |
AddSessionParams method
Adapter user should add all the session related params using this method
- Parameters
-
param | SessionPaaram instance. |
◆ getSessionConfiguration()
SessionConfigs & com::apama::session::SessionInterface::getSessionConfiguration |
( |
| ) |
|
getSessionConfiguration method
Adapter user can query all the session related information through this method. This will return SessionConfigs structure.
◆ getSessionState()
virtual AP_SESSION_State com::apama::session::SessionInterface::getSessionState |
( |
| ) |
|
|
virtual |
getSessionState method
this methods returns session state for current sessionInterface
◆ onSessionReconfigure()
virtual void com::apama::session::SessionInterface::onSessionReconfigure |
( |
int64_t |
sourceId, |
|
|
map_t & |
configParams |
|
) |
| |
|
pure virtual |
Session Reconfigure Callback
A registered session as being signalled to reconfigure. The supplied configuration parameters should be used to reconfigure. If successful, call SessionReconfigureSuccess(), else SessionReconfigureError().
- Parameters
-
sourceId | The source Id given to this session. |
configParams | User configuration parameters. |
◆ onSessionRegistrationError()
virtual void com::apama::session::SessionInterface::onSessionRegistrationError |
( |
const std::string & |
sessionName | ) |
|
|
pure virtual |
Session Registration Error Callback
This is called when an error occured during session registration after the adapter has called RegisterSession() or RegisterSessions() of Connectivity_SessionManager.h .
- Parameters
-
sessionName | The name of the session that failed registered. |
◆ onSessionRegistrationSuccess()
virtual void com::apama::session::SessionInterface::onSessionRegistrationSuccess |
( |
const std::string & |
sessionName, |
|
|
int64_t |
sourceId |
|
) |
| |
|
pure virtual |
Session Registration Success Callback
This is called on a successful registration of a Session after the adapter has called RegisterSession() or RegisterSessions() of Connectivity_SessionManager.h .
- Parameters
-
sessionName | The name of the session successfully registered. |
sourceId | The source Id given to this session. |
◆ onSessionStart()
virtual void com::apama::session::SessionInterface::onSessionStart |
( |
int64_t |
sourceId, |
|
|
map_t & |
configParams |
|
) |
| |
|
pure virtual |
Session Start Callback
A registered session as being signalled to start, the adapter should attempt to connect to the external source. Once the session is connected, it should set the session state to SESSION_CONNECTED using SetSessionStateByName() or SetSessionStateById() and then call SessionStartSuccess(). If the connection fails, call SessionStartError() of Connectivity_SessionManager.h .
- Parameters
-
sourceId | The source Id given to this session. |
configParams | User configuration parameters. |
◆ onSessionStop()
virtual void com::apama::session::SessionInterface::onSessionStop |
( |
int64_t |
sourceId | ) |
|
|
pure virtual |
Session Stop Callback
A registered and started session as being signalled to stop, the adapter should attempt the following:-
- Unsubscribe to all symbols.
- Disconnect from the external source.
- Once the session is disconnected, it should set the session state to SESSION_DISCONNECTED using SetSessionStateByName() or SetSessionStateById() and then call SessionStopSuccess(). If the disconnection fails, call SessionStopError().
- Parameters
-
sourceId | The source Id given to this session. |
◆ setChainName()
void com::apama::session::SessionInterface::setChainName |
( |
const std::string & |
chainName | ) |
|
setChainName method
This method should be called before adding and registering any session. ChainName will be used to notify session start/stop success/error to different chains.
- Parameters
-
chainName | Chain name provided in Yaml file. |
◆ setChannelName()
void com::apama::session::SessionInterface::setChannelName |
( |
const std::string & |
channelName | ) |
|
setChannelName method
This method should be called before adding and registering any session.
- Parameters
-
channelName | Name of channel. |
◆ setDescription()
void com::apama::session::SessionInterface::setDescription |
( |
const std::string & |
description | ) |
|
setDescription method
This method should be called before adding and registering any session. This method is used to provide simple description of session.
- Parameters
-
description | The Description of Session. |
◆ setHostSide()
virtual void com::apama::session::SessionInterface::setHostSide |
( |
HostSide * |
hostSide | ) |
|
|
virtual |
setHostSide method
This method should be called before adding and registering any session. This will be used to send messages towards host(correlator)
- Parameters
-
hostSide | Hostside pointer provided by transport/codec. |
◆ setSessionName()
void com::apama::session::SessionInterface::setSessionName |
( |
const std::string & |
sessionName | ) |
|
setSessionName method
This method should be called before adding and registering any session. Session name should be different for
- Parameters
-
sessionName | Name of session. |
◆ SetSessionState()
virtual void com::apama::session::SessionInterface::SetSessionState |
( |
AP_SESSION_State |
state, |
|
|
bool |
generateNewId |
|
) |
| |
|
virtual |
SetSessionState method
sets session state given in arugment state. If new connectionId is needed set generateNewId to true
- Parameters
-
state | The source Id given to this session. |
generateNewId | User configuration parameters. |
The documentation for this class was generated from the following file: