00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef SEMAINE_CMS_RECEIVER_EMMARECEIVER_H
00012 #define SEMAINE_CMS_RECEIVER_EMMARECEIVER_H
00013
00014 #include <semaine/config.h>
00015
00016 #include <semaine/cms/receiver/XMLReceiver.h>
00017 #include <semaine/cms/message/SEMAINEEmmaMessage.h>
00018
00019
00020
00021 using namespace cms;
00022 using namespace semaine::cms::exceptions;
00023 using namespace semaine::cms::message;
00024
00025 namespace semaine {
00026 namespace cms {
00027 namespace receiver {
00028
00034 class EmmaReceiver : public XMLReceiver
00035 {
00036 public:
00048 EmmaReceiver(const std::string & topicName) throw(CMSException) :
00049 XMLReceiver(topicName)
00050 {}
00051
00066 EmmaReceiver(const std::string & topicName, const std::string & messageSelector)
00067 throw(CMSException) :
00068 XMLReceiver(topicName, messageSelector)
00069 {}
00070
00079 EmmaReceiver(const std::string & cmsUrl, const std::string & cmsUser, const std::string & cmsPassword,
00080 const std::string & topicName)
00081 throw (CMSException) :
00082 XMLReceiver(cmsUrl, cmsUser, cmsPassword, topicName)
00083 {}
00084
00096 EmmaReceiver(const std::string & cmsUrl, const std::string & cmsUser, const std::string & cmsPassword,
00097 const std::string & topicName, const std::string & messageSelector)
00098 throw (CMSException) :
00099 XMLReceiver(cmsUrl, cmsUser, cmsPassword, topicName, messageSelector)
00100 {}
00101
00102
00103 protected:
00104 virtual SEMAINEMessage * createSEMAINEMessage(const Message * message)
00105 throw(MessageFormatException)
00106 {
00107 return new SEMAINEEmmaMessage(message);
00108 }
00109
00110 };
00111
00112 }
00113 }
00114 }
00115
00116
00117 #endif
00118