44 void setIp(
const std::string& _ip) { m_ip = _ip; };
45 const std::string&
ip(
void)
const {
return m_ip; };
47 void setPort(
const std::string& _port);
48 const std::string&
port(
void)
const {
return m_port; };
53 std::string
url(
void)
const {
return m_ip +
":" + m_port; };
60 const std::string&
dataBaseURL(
void)
const {
return m_dataBaseURL; }
67 const std::string&
siteID(
void)
const {
return m_siteID; }
99 const std::string & _userName,
100 const std::string & _projectName,
101 const std::string & _collectionName,
102 const std::string & _sessionType
127 bool _autoCloseSessionIfMandatory =
true
139 std::list<const Session *>
sessions(
void);
190 std::string m_dataBaseURL;
191 std::string m_siteID;
192 std::string m_serviceAuthorisationURL;
201 std::map<std::string, bool> m_serviceDebugList;
202 std::map<std::string,
203 std::vector<ot::ServiceBase> *> m_mandatoryServicesMap;
204 std::map<std::string, Session *> m_sessionMap;
209 std::list<std::string> m_sessionShutdownQueue;
#define OT_HANDLER(___functionName, ___className, ___actionName, ___messageTypeFlags)
Creates a function that will be registered in the dispatch system. The generated function will look l...
Definition ActionHandleConnector.h:26
#define OT_ACTION_CMD_ServiceDisableDebug
Definition ActionTypes.h:70
#define OT_ACTION_CMD_GetGlobalServicesUrl
Definition ActionTypes.h:23
#define OT_ACTION_CMD_CheckStartupCompleted
Definition ActionTypes.h:73
#define OT_ACTION_CMD_GetSystemInformation
Definition ActionTypes.h:43
#define OT_ACTION_CMD_ServiceFailure
Definition ActionTypes.h:49
#define OT_ACTION_CMD_GetSessionExists
Definition ActionTypes.h:45
#define OT_ACTION_CMD_AddMandatoryService
Definition ActionTypes.h:51
#define OT_ACTION_CMD_Message
Definition ActionTypes.h:27
#define OT_ACTION_CMD_ServiceEnableDebug
Definition ActionTypes.h:69
#define OT_ACTION_CMD_ServiceHide
Definition ActionTypes.h:71
#define OT_ACTION_CMD_GetDatabaseUrl
Definition ActionTypes.h:21
#define OT_ACTION_CMD_Reset
Definition ActionTypes.h:56
#define OT_ACTION_CMD_IsProjectOpen
Definition ActionTypes.h:37
#define OT_ACTION_CMD_GetSessionServices
Definition ActionTypes.h:46
#define OT_ACTION_CMD_ShutdownSession
Definition ActionTypes.h:47
#define OT_ACTION_CMD_RegisterNewGlobalDirecotoryService
Definition ActionTypes.h:40
#define OT_ACTION_CMD_GetDebugInformation
Definition ActionTypes.h:57
#define OT_ACTION_CMD_ServiceClosing
Definition ActionTypes.h:29
#define OT_ACTION_CMD_GetAuthorisationServerUrl
Definition ActionTypes.h:22
#define OT_ACTION_CMD_SetGlobalLogFlags
Definition ActionTypes.h:63
#define OT_ACTION_CMD_RegisterNewService
Definition ActionTypes.h:30
#define OT_ACTION_CMD_ServiceShow
Definition ActionTypes.h:72
#define OT_ACTION_CMD_SendBroadcastMessage
Definition ActionTypes.h:38
#define OT_ACTION_CMD_ServiceStartupFailed
Definition ActionTypes.h:50
#define OT_ACTION_CMD_GetMandatoryServices
Definition ActionTypes.h:24
#define OT_ACTION_CMD_CreateNewSession
Definition ActionTypes.h:35
const char const char const char * _sessionID
Definition dllmain.cpp:62
const char * _serviceURL
Definition dllmain.cpp:93
Definition GlobalDirectoryService.h:7
Definition GlobalSessionService.h:28
Definition relayService.h:19
Definition SessionService.h:33
const std::string & port(void) const
Definition SessionService.h:48
void setGlobalDirectoryServiceURL(const std::string &_url)
Definition SessionService.cpp:128
const std::string & serviceAuthorisationURL(void) const
Will return the session service service directory IP.
Definition SessionService.h:74
Service * getServiceFromURL(const std::string &_url)
Definition SessionService.cpp:383
void updateLogMode(const ot::LogModeManager &_newData)
Definition SessionService.cpp:1097
bool runServiceInDebug(const std::string &_serviceName, const std::string &_serviceType, Session *_session, std::string &_serviceURL)
Definition SessionService.cpp:292
const std::string & ip(void) const
Definition SessionService.h:45
bool runMandatoryServices(const std::string &_sessionID)
Will ensure that all mandatory services for the specified session are running.
Definition SessionService.cpp:166
static SessionService * instance(void)
Definition SessionService.cpp:109
virtual ~SessionService()
Definition SessionService.h:36
Session * createSession(const std::string &_sessionID, const std::string &_userName, const std::string &_projectName, const std::string &_collectionName, const std::string &_sessionType)
Will create a new session with the provided session information Will return a pointer to the new sess...
Definition SessionService.cpp:136
void forgetSession(Session *_session)
Removes the session from the service run starter and all maps.
Definition SessionService.cpp:279
std::string url(void) const
Definition SessionService.h:53
void setAuthorisationServiceURL(const std::string &_url)
Will set the authorisation service IP.
Definition SessionService.h:71
void setPort(const std::string &_port)
Definition SessionService.cpp:120
void setId(ot::serviceID_t _id)
Definition SessionService.h:50
std::list< const Session * > sessions(void)
Definition SessionService.cpp:284
Session * getSession(const std::string &_sessionID)
Returns the session with the specified id.
Definition SessionService.cpp:155
void initializeSystemInformation()
Initialize the collection of system information (e.g. CPU time and memory).
Definition SessionService.cpp:1092
void setGlobalSessionService(GlobalSessionService *_gss)
Definition SessionService.h:145
void setDataBaseURL(const std::string &_url)
Will set the database IP.
Definition SessionService.h:57
SessionService()
Definition SessionService.cpp:37
void removeSession(Session *_session)
Will remove the session and close its logger. Will NOT perform the session shutdown()....
Definition SessionService.cpp:274
void setIp(const std::string &_ip)
Definition SessionService.h:44
void serviceClosing(Service *_service, bool _notifyOthers, bool _autoCloseSessionIfMandatory=true)
Will close the service and deregister it from its session.
Definition SessionService.cpp:231
ot::serviceID_t id(void) const
Definition SessionService.h:51
void setSiteID(std::string _ID)
Will set the site ID.
Definition SessionService.h:64
bool runRelayService(Session *_session, std::string &_websocketURL, std::string &_serviceURL)
Definition SessionService.cpp:336
bool isServiceInDebugMode(const std::string &_serviceName)
Will return true if the provided service is in debug mode.
Definition SessionService.cpp:105
const std::string & siteID(void) const
Will return the session service site ID.
Definition SessionService.h:67
const std::string & dataBaseURL(void) const
Will return the database IP.
Definition SessionService.h:60
Definition ActionHandler.h:14
Definition LogModeManager.h:13
@ SECURE_MESSAGE_TYPES
Definition CommunicationTypes.h:14
@ ALL_MESSAGE_TYPES
Definition CommunicationTypes.h:15
unsigned short serviceID_t
ID type used to identify a service (16 bit unsigned integer).
Definition CoreTypes.h:14