00001 00034 #ifndef CMSCLIENT_H 00035 #define CMSCLIENT_H 00036 00037 #include "oldgcccompat.h" // Compatibilty macros for GCC < 4.7 00038 00039 #include <cms/CMSException.h> 00040 #include <cms/ExceptionListener.h> 00041 #include <cms/MessageListener.h> 00042 00049 namespace cms 00050 { 00051 // Forward declarations 00052 class Connection; 00053 class Destination; 00054 class MessageConsumer; 00055 class Session; 00056 } 00057 00058 namespace AlarmNotifications 00059 { 00060 00061 class AlarmServerConnector; // Forward declaration 00062 00070 class CMSClient : public cms::MessageListener, public cms::ExceptionListener 00071 { 00072 private: 00078 AlarmServerConnector& _asc; 00084 cms::Connection* _connection; 00090 cms::Session* _session; 00096 cms::Destination* _topicServer; 00102 cms::MessageConsumer* _consumerServer; 00103 00111 virtual void onMessage ( const cms::Message* message ) noexcept; 00119 virtual void onException ( const cms::CMSException& ex ) noexcept; 00120 public: 00129 CMSClient ( AlarmServerConnector& asc ); 00135 ~CMSClient(); 00142 CMSClient ( const CMSClient& other ) = delete; 00149 CMSClient ( CMSClient&& other ) = delete; 00157 CMSClient& operator= ( const CMSClient& other ) = delete; 00165 CMSClient& operator= ( CMSClient&& other ) = delete; 00166 }; 00167 00168 } 00169 00170 #endif // CMSCLIENT_H