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