OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ServiceRunStarter.h
Go to the documentation of this file.
1#pragma once
2
3// OT header
4#include "OTCore/CoreTypes.h"
5
6// std header
7#include <mutex>
8#include <list>
9
10class Service;
11class Session;
12
14public:
16
17 void addService(Session * _session, Service * _service);
18 void sessionClosing(const std::string& _sessionId);
19
20private:
22 virtual ~ServiceRunStarter();
23
24 bool queueEmpty(void);
25 void worker(void);
26 void sendRunMessageToService(std::string serviceURL, std::string messageOut, std::string serviceName, std::string serviceType, std::string serviceId);
27
28 struct startupInformation {
29 std::string sessionId;
30
31 std::string serviceName;
32 std::string serviceType;
33 std::string serviceUrl;
34 ot::serviceID_t serviceId;
35
36 std::string credentialsUserName;
37 std::string credentialsUserPassword;
38
39 std::string databaseUserName;
40 std::string databaseUserPassword;
41
42 std::string userCollection;
43 std::string sessionType;
44 };
45
46 std::mutex m_mutex;
47 bool m_isStopping;
48 bool m_isRunning;
49 std::list<startupInformation> m_queue;
50};
Definition Service.h:17
Definition ServiceRunStarter.h:13
void sessionClosing(const std::string &_sessionId)
Definition ServiceRunStarter.cpp:43
virtual ~ServiceRunStarter()
Definition ServiceRunStarter.cpp:64
static ServiceRunStarter & instance()
Definition ServiceRunStarter.cpp:12
void addService(Session *_session, Service *_service)
Definition ServiceRunStarter.cpp:17
Definition Session.h:11
unsigned short serviceID_t
ID type used to identify a service (16 bit unsigned integer).
Definition CoreTypes.h:14