#include <Connectivity_SessionManager.h>
|
| SessionManager (Logger &logger) |
|
virtual void | setHostSide (HostSide *hostSideptr)=0 |
|
virtual void | addSession (const std::string &chainName, const std::string &sessionName, const std::string &description, SessionInterface *sessionHandler)=0 |
|
virtual void | RegisterSessions (int interval=5)=0 |
|
virtual void | RegisterSession (const std::string &sessionName)=0 |
|
virtual bool | HasCapability (const std::string &sessionName, const std::string &capability)=0 |
|
virtual void | DeleteSessionByName (const std::string &sessionName)=0 |
|
virtual void | DeleteSessionById (int64_t sourceId)=0 |
|
virtual int64_t | getSessionId (const std::string &sessionName)=0 |
|
virtual std::string | getSessionName (int64_t sessionId)=0 |
|
virtual void | Start ()=0 |
|
virtual void | Stop ()=0 |
|
virtual void | Clear ()=0 |
|
virtual void | SetSessionStateByName (const std::string &sessionName, AP_SESSION_State state, bool generateNewId=false)=0 |
|
virtual void | SetSessionStateById (int64_t sourceId, AP_SESSION_State state, bool usePreviousGenerationId=false)=0 |
|
virtual AP_SESSION_State | GetSessionStateByName (const std::string &sessionName)=0 |
|
virtual AP_SESSION_State | GetSessionStateById (int64_t sourceId)=0 |
|
virtual void | SessionStartSuccess (int64_t sourceId)=0 |
|
virtual void | SessionStartError (int64_t sourceId, const std::string &errMsg)=0 |
|
virtual void | SessionStopSuccess (int64_t sourceId)=0 |
|
virtual void | SessionStopError (int64_t sourceId, const std::string &errMsg)=0 |
|
virtual void | SessionReconfigureSuccess (int64_t sourceId)=0 |
|
virtual void | SessionReconfigureError (int64_t sourceId, const std::string &errMsg)=0 |
|
virtual bool | ProcessMessage (Message &msg)=0 |
|
SessionManager class which contains all the methods to drive session related operations like add/delete
com::apama::session::SessionManager::SessionManager |
( |
Logger & |
logger | ) |
|
|
inline |
SessionManager constructor which takes logger object instance as input
- Parameters
-
logger | Logger instance of connectivity plugin transport/codec. |
virtual void com::apama::session::SessionManager::addSession |
( |
const std::string & |
chainName, |
|
|
const std::string & |
sessionName, |
|
|
const std::string & |
description, |
|
|
SessionInterface * |
sessionHandler |
|
) |
| |
|
pure virtual |
Add session for registration.
RegisterSession() or RegisterSessions() has to be called to actually register any added sessions.
- Parameters
-
chainName | The name of the transport to be added. |
sessionName | The name of the session to be added. |
description | The description of the session to be added. |
sessionHandler | Instance of SessionInterface |
virtual void com::apama::session::SessionManager::Clear |
( |
| ) |
|
|
pure virtual |
Delete all registered sessions.
virtual void com::apama::session::SessionManager::DeleteSessionById |
( |
int64_t |
sourceId | ) |
|
|
pure virtual |
Delete a specific session by Id.
- Parameters
-
sourceId | The id of the session to delete. |
virtual void com::apama::session::SessionManager::DeleteSessionByName |
( |
const std::string & |
sessionName | ) |
|
|
pure virtual |
Delete a specific session by Name.
- Parameters
-
sessionName | The name of the session to delete. |
virtual int64_t com::apama::session::SessionManager::getSessionId |
( |
const std::string & |
sessionName | ) |
|
|
pure virtual |
Get the Id of a session by its Name.
- Parameters
-
sessionName | The name of the session to get the Id for. |
- Returns
- The Id of the session or -1 if not found
virtual std::string com::apama::session::SessionManager::getSessionName |
( |
int64_t |
sessionId | ) |
|
|
pure virtual |
Get the name of a session by its Id.
- Parameters
-
sessionId | The Id of the session to get the name for. |
- Returns
- The name of the session or NULL if not found
virtual AP_SESSION_State com::apama::session::SessionManager::GetSessionStateById |
( |
int64_t |
sourceId | ) |
|
|
pure virtual |
Get a Sessions State by Id.
- Parameters
-
sourceId | The Id of the session to get the state. |
- Returns
- The session state.
virtual AP_SESSION_State com::apama::session::SessionManager::GetSessionStateByName |
( |
const std::string & |
sessionName | ) |
|
|
pure virtual |
Get a Sessions State by name.
- Parameters
-
sessionName | The name of the session to get the state. |
- Returns
- The session state.
virtual bool com::apama::session::SessionManager::HasCapability |
( |
const std::string & |
sessionName, |
|
|
const std::string & |
capability |
|
) |
| |
|
pure virtual |
Query if a session has a capability.
- Parameters
-
sessionName | The name of the session to register. |
capability | The name of the capability to query for. |
- Returns
- True if session has the capability, else false.
virtual bool com::apama::session::SessionManager::ProcessMessage |
( |
Message & |
msg | ) |
|
|
pure virtual |
Process an upstream session messge.
- Parameters
-
msg | The session message to process. |
virtual void com::apama::session::SessionManager::RegisterSession |
( |
const std::string & |
sessionName | ) |
|
|
pure virtual |
Register a specific session.
- Parameters
-
sessionName | The name of the session to register. |
virtual void com::apama::session::SessionManager::RegisterSessions |
( |
int |
interval = 5 | ) |
|
|
pure virtual |
Register all session that have been added.
- Parameters
-
interval | Register session interval. |
virtual void com::apama::session::SessionManager::SessionReconfigureError |
( |
int64_t |
sourceId, |
|
|
const std::string & |
errMsg |
|
) |
| |
|
pure virtual |
Callback when a Session fails to reconfigure in response to SessionInterface::onSessionReconfigure().
- Parameters
-
sourceId | The Id of the session that failed to reconfigure. |
errMsg | An error message explaining why the session failed to reconfigure. |
virtual void com::apama::session::SessionManager::SessionReconfigureSuccess |
( |
int64_t |
sourceId | ) |
|
|
pure virtual |
virtual void com::apama::session::SessionManager::SessionStartError |
( |
int64_t |
sourceId, |
|
|
const std::string & |
errMsg |
|
) |
| |
|
pure virtual |
Callback when a Session fails to start in response to SessionInterface::onSessionStart().
- Parameters
-
sourceId | The Id of the session that failed to start. |
errMsg | An error message explaining why the session failed to start. |
virtual void com::apama::session::SessionManager::SessionStartSuccess |
( |
int64_t |
sourceId | ) |
|
|
pure virtual |
virtual void com::apama::session::SessionManager::SessionStopError |
( |
int64_t |
sourceId, |
|
|
const std::string & |
errMsg |
|
) |
| |
|
pure virtual |
Callback when a Session fails to stop in response to SessionInterface::onSessionStop().
- Parameters
-
sourceId | The Id of the session that failed to stop. |
errMsg | An error message explaining why the session failed to stop. |
virtual void com::apama::session::SessionManager::SessionStopSuccess |
( |
int64_t |
sourceId | ) |
|
|
pure virtual |
virtual void com::apama::session::SessionManager::setHostSide |
( |
HostSide * |
hostSideptr | ) |
|
|
pure 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
-
hostSideptr | Hostside pointer provided by transport/codec. |
virtual void com::apama::session::SessionManager::SetSessionStateById |
( |
int64_t |
sourceId, |
|
|
AP_SESSION_State |
state, |
|
|
bool |
usePreviousGenerationId = false |
|
) |
| |
|
pure virtual |
Set a Sessions State by Id.
- Parameters
-
sourceId | The id of the session to set the state. |
state | The state to set the session to. |
usePreviousGenerationId | Whether to generate a new connection Id. |
virtual void com::apama::session::SessionManager::SetSessionStateByName |
( |
const std::string & |
sessionName, |
|
|
AP_SESSION_State |
state, |
|
|
bool |
generateNewId = false |
|
) |
| |
|
pure virtual |
Set a Sessions State by name.
- Parameters
-
sessionName | The name of the session to set the state. |
state | The state to set the session to. |
generateNewId | Whether to generate a new connection Id. |
virtual void com::apama::session::SessionManager::Start |
( |
| ) |
|
|
pure virtual |
Start the session interface. Used during start() in the transport.
virtual void com::apama::session::SessionManager::Stop |
( |
| ) |
|
|
pure virtual |
Stop the session interface. Used during stop() in the transport.
The documentation for this class was generated from the following file: