AlarmNotifications
PANDA Slow Control Alarm Daemon
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cmsclient.h
Go to the documentation of this file.
1 
34 #ifndef CMSCLIENT_H
35 #define CMSCLIENT_H
36 
37 #include "oldgcccompat.h" // Compatibilty macros for GCC < 4.7
38 
39 #include <cms/CMSException.h>
40 #include <cms/ExceptionListener.h>
41 #include <cms/MessageListener.h>
42 
49 namespace cms
50 {
51 // Forward declarations
52 class Connection;
53 class Destination;
54 class MessageConsumer;
55 class Session;
56 }
57 
58 namespace AlarmNotifications
59 {
60 
61 class AlarmServerConnector; // Forward declaration
62 
70 class CMSClient : public cms::MessageListener, public cms::ExceptionListener
71 {
72 private:
84  cms::Connection* _connection;
90  cms::Session* _session;
96  cms::Destination* _topicServer;
102  cms::MessageConsumer* _consumerServer;
103 
111  virtual void onMessage ( const cms::Message* message ) noexcept;
119  virtual void onException ( const cms::CMSException& ex ) noexcept;
120 public:
135  ~CMSClient();
142  CMSClient ( const CMSClient& other ) = delete;
149  CMSClient ( CMSClient&& other ) = delete;
157  CMSClient& operator= ( const CMSClient& other ) = delete;
165  CMSClient& operator= ( CMSClient&& other ) = delete;
166 };
167 
168 }
169 
170 #endif // CMSCLIENT_H
Compatibility macros for older versions of the GCC.
CMSClient & operator=(const CMSClient &other)=delete
Copy assignment (deleted)
virtual void onException(const cms::CMSException &ex) noexcept
Exception listener.
Definition: cmsclient.cpp:187
cms::Session * _session
CMS session.
Definition: cmsclient.h:90
C++ Messaging Service client.
Definition: cmsclient.h:70
CMSClient(AlarmServerConnector &asc)
Constructor.
Definition: cmsclient.cpp:52
Namespace for Alarm Notifications application.
virtual void onMessage(const cms::Message *message) noexcept
Message listener.
Definition: cmsclient.cpp:163
AlarmServerConnector & _asc
AlarmServerConnector instance.
Definition: cmsclient.h:78
C++ Messaging Service.
Definition: cmsclient.h:49
#define noexcept
Allow using the noexcept keyword with GCC < 4.6.
Definition: oldgcccompat.h:52
cms::Connection * _connection
CMS connection.
Definition: cmsclient.h:84
cms::Destination * _topicServer
CMS topic.
Definition: cmsclient.h:96
cms::MessageConsumer * _consumerServer
CMS receiver.
Definition: cmsclient.h:102