UMPS
The University of Utah Seismograph Stations Message Passing System.
proxy.hpp
1 #ifndef UMPS_PROXY_SERVICES_COMMAND_PROXY_HPP
2 #define UMPS_PROXY_SERVICES_COMMAND_PROXY_HPP
3 #include <memory>
4 namespace UMPS
5 {
6  namespace Authentication
7  {
8  class IAuthenticator;
9  }
10  namespace Logging
11  {
12  class ILog;
13  }
14  namespace Messaging
15  {
16  class Context;
17  }
18  namespace Services
19  {
20  namespace ConnectionInformation
21  {
22  class Details;
23  }
24  }
25  namespace ProxyServices::Command
26  {
27  class ProxyOptions;
28  }
29 }
35 namespace UMPS::ProxyServices::Command
36 {
37 class Proxy
38 {
39 public:
42 
44  Proxy();
46  explicit Proxy(std::shared_ptr<UMPS::Logging::ILog> &logger);
48  Proxy(std::shared_ptr<UMPS::Logging::ILog> &logger,
49  std::shared_ptr<UMPS::Authentication::IAuthenticator> &authenticator);
51  Proxy(std::shared_ptr<UMPS::Logging::ILog> &logger,
52  std::shared_ptr<UMPS::Authentication::IAuthenticator> &frontendAuthenticator,
53  std::shared_ptr<UMPS::Authentication::IAuthenticator> &backendAuthenticator);
55 
58 
61  void initialize(const ProxyOptions &options);
63  [[nodiscard]] bool isInitialized() const noexcept;
65  [[nodiscard]] std::string getName() const;
67  [[nodiscard]] Services::ConnectionInformation::Details getConnectionDetails() const;
69 
72 
77  void start();
79  [[nodiscard]] bool isRunning() const noexcept;
81  void stop();
83 
86 
88  ~Proxy();
90 private:
91  class ProxyImpl;
92  std::unique_ptr<ProxyImpl> pImpl;
93 };
94 }
95 #endif
Definition: proxy.hpp:38
Services::ConnectionInformation::Details getConnectionDetails() const
Proxy(std::shared_ptr< UMPS::Logging::ILog > &logger)
Constructor with a given logger.
Proxy(std::shared_ptr< UMPS::Logging::ILog > &logger, std::shared_ptr< UMPS::Authentication::IAuthenticator > &frontendAuthenticator, std::shared_ptr< UMPS::Authentication::IAuthenticator > &backendAuthenticator)
Constructor with a given logger and frontend and backend authenticator.
void initialize(const ProxyOptions &options)
Initializes the proxy.
void start()
Starts the proxy.
Proxy(std::shared_ptr< UMPS::Logging::ILog > &logger, std::shared_ptr< UMPS::Authentication::IAuthenticator > &authenticator)
Constructor with a logger and given authenticator.
bool isRunning() const noexcept
bool isInitialized() const noexcept
Defines the options for the command proxy.
Definition: proxyOptions.hpp:21