Apama Capital Markets Foundation 10.15.0.0
Connectivity_SessionManager.h
Go to the documentation of this file.
1
10#ifndef _SESSION_MANAGER_H_
11#define _SESSION_MANAGER_H_
12
14
15namespace com {
16 namespace apama {
17 namespace session {
18
22 class DLLEXPORT SessionManager {
23 public:
31 (
32 Logger& logger
33 ) :
34 logger_(logger)
35 {
36 };
37 virtual ~SessionManager() {};
38
39
49 virtual void setHostSide(HostSide* hostSideptr) = 0;
50
64 virtual void addSession(const std::string& chainName, const std::string& sessionName,
65 const std::string& description, SessionInterface *sessionHandler) = 0;
66
74 virtual void RegisterSessions(int interval = 5) = 0;
75
83 virtual void RegisterSession(const std::string& sessionName) = 0;
84
94 virtual bool HasCapability(const std::string& sessionName, const std::string& capability) = 0;
95
102 virtual void DeleteSessionByName(const std::string& sessionName) = 0;
103
110 virtual void DeleteSessionById(int64_t sourceId) = 0;
111
120 virtual int64_t getSessionId(const std::string& sessionName) = 0;
121
130 virtual std::string getSessionName(int64_t sessionId) = 0;
131
137 virtual void Start() = 0;
138
144 virtual void Stop() = 0;
145
151 virtual void Clear() = 0;
152
161 virtual void SetSessionStateByName(const std::string& sessionName, AP_SESSION_State state, bool generateNewId = false) = 0;
162
171 virtual void SetSessionStateById(int64_t sourceId, AP_SESSION_State state, bool usePreviousGenerationId = false) = 0;
172
173
182 virtual AP_SESSION_State GetSessionStateByName(const std::string& sessionName) = 0;
183
184
193 virtual AP_SESSION_State GetSessionStateById(int64_t sourceId) = 0;
194
202 virtual void SessionStartSuccess(int64_t sourceId) = 0;
203
212 virtual void SessionStartError(int64_t sourceId, const std::string& errMsg) = 0;
213
221 virtual void SessionStopSuccess(int64_t sourceId) = 0;
222
231 virtual void SessionStopError(int64_t sourceId, const std::string& errMsg) = 0;
232
240 virtual void SessionReconfigureSuccess(int64_t sourceId) = 0;
241
250 virtual void SessionReconfigureError(int64_t sourceId, const std::string& errMsg) = 0;
251
252
259 virtual bool ProcessMessage(Message& msg) = 0;
260
261 private:
262 HostSide* hostSide_;
263 Logger logger_;
264 SessionInterface* sessionHandlerIface_;
265 };
266
267
269 class DLLEXPORT SessionManagerFactory {
270 public:
271
279 static SessionManager* createSessionManager(Logger& logger);
280 };
281 }
282 }
283}
284
285#endif
AP_SESSION_State
Definition: Connectivity_SessionDefs.h:32
Interface class for the Each Session.
Definition: Connectivity_SessionInterface.h:33
Definition: Connectivity_SessionManager.h:269
static SessionManager * createSessionManager(Logger &logger)
Definition: Connectivity_SessionManager.h:22
virtual AP_SESSION_State GetSessionStateByName(const std::string &sessionName)=0
virtual void SessionStartError(int64_t sourceId, const std::string &errMsg)=0
virtual int64_t getSessionId(const std::string &sessionName)=0
virtual void RegisterSession(const std::string &sessionName)=0
virtual void SetSessionStateByName(const std::string &sessionName, AP_SESSION_State state, bool generateNewId=false)=0
virtual void SessionReconfigureSuccess(int64_t sourceId)=0
virtual void SessionStartSuccess(int64_t sourceId)=0
virtual AP_SESSION_State GetSessionStateById(int64_t sourceId)=0
virtual void setHostSide(HostSide *hostSideptr)=0
virtual bool HasCapability(const std::string &sessionName, const std::string &capability)=0
virtual bool ProcessMessage(Message &msg)=0
virtual void SessionStopSuccess(int64_t sourceId)=0
virtual void DeleteSessionByName(const std::string &sessionName)=0
virtual void DeleteSessionById(int64_t sourceId)=0
virtual void RegisterSessions(int interval=5)=0
virtual void SetSessionStateById(int64_t sourceId, AP_SESSION_State state, bool usePreviousGenerationId=false)=0
virtual void SessionStopError(int64_t sourceId, const std::string &errMsg)=0
virtual void SessionReconfigureError(int64_t sourceId, const std::string &errMsg)=0
SessionManager(Logger &logger)
Definition: Connectivity_SessionManager.h:31
virtual std::string getSessionName(int64_t sessionId)=0
virtual void addSession(const std::string &chainName, const std::string &sessionName, const std::string &description, SessionInterface *sessionHandler)=0