Apama Capital Markets Foundation  10.3.1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Connectivity_SessionInterface.h
Go to the documentation of this file.
1 
10 #ifndef _SESSION_INTERFACE_H_
11 #define _SESSION_INTERFACE_H_
12 
13 
14 #if defined(_APBUILD_WIN32_ALL__) || defined(__WIN32__) || defined(WIN32)
15 #define DLLEXPORT __declspec(dllexport)
16 #elif defined(_APBUILD_UNIX_ALL__) || defined(__unix__)
17 #define DLLEXPORT
18 #endif
19 
20 
21 #include <string>
22 #include <CUtil.h>
24 
25 namespace com {
26  namespace apama {
27  namespace session {
28 
32  class DLLEXPORT SessionInterface
33  {
34  public:
35 
47  SessionInterface(Logger& logger);
48 
49  virtual ~SessionInterface() {};
50 
61  virtual void setHostSide(HostSide* hostSide);
62 
74  void setChainName(const std::string& chainName);
75 
85  void setSessionName(const std::string& sessionName);
86 
96  void setChannelName(const std::string& channelName);
97 
108  void setDescription(const std::string& description);
109 
120  virtual void AddSessionParams(SessionParam& param);
121 
132  virtual void AddCapabilities(Capability& capability);
133 
141  SessionConfigs& getSessionConfiguration();
142 
154  virtual void SetSessionState(AP_SESSION_State state, bool generateNewId);
155 
163  virtual AP_SESSION_State getSessionState();
164 
179  virtual void onSessionStart(int64_t sourceId, map_t& configParams) = 0;
180 
197  virtual void onSessionStop(int64_t sourceId) = 0;
198 
211  virtual void onSessionReconfigure(int64_t sourceId, map_t& configParams) = 0;
212 
224  virtual void onSessionRegistrationSuccess(const std::string& sessionName, int64_t sourceId) = 0;
225 
236  virtual void onSessionRegistrationError(const std::string& sessionName) = 0;
237 
238  private:
239  Logger logger_;
240  SessionConfigs sessionConfigs_;
241  CapabilityParams capabilityParams_;
242  HostSide* hostSide_;
243  std::string loggerPrefix_;
244  };
245  }
246  }
247 }
248 
249 #endif
All the session related definitions and constants.
Definition: Connectivity_SessionDefs.h:120
AP_SESSION_State
Definition: Connectivity_SessionDefs.h:31
Definition: Connectivity_SessionInterface.h:32
Definition: Connectivity_MDInterfaces.h:59
Definition: Connectivity_SessionDefs.h:248
Definition: Connectivity_SessionDefs.h:298
Definition: Connectivity_SessionDefs.h:335