00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _CMS_CONNECTIONFACTORY_H_
00018 #define _CMS_CONNECTIONFACTORY_H_
00019
00020 #include <cms/Config.h>
00021 #include <cms/CMSException.h>
00022
00023 #include <string>
00024
00025 namespace cms {
00026
00027 class Connection;
00028 class ExceptionListener;
00029 class MessageTransformer;
00030
00041 class CMS_API ConnectionFactory {
00042 public:
00043
00044 virtual ~ConnectionFactory();
00045
00057 virtual cms::Connection* createConnection() = 0;
00058
00077 virtual cms::Connection* createConnection(const std::string& username, const std::string& password) = 0;
00078
00100 virtual cms::Connection* createConnection(const std::string& username, const std::string& password, const std::string& clientId) = 0;
00101
00109 virtual void setExceptionListener(cms::ExceptionListener* listener) = 0;
00110
00120 virtual cms::ExceptionListener* getExceptionListener() const = 0;
00121
00133 virtual void setMessageTransformer(cms::MessageTransformer* transformer) = 0;
00134
00140 virtual cms::MessageTransformer* getMessageTransformer() const = 0;
00141
00142 public:
00143
00159 static cms::ConnectionFactory* createCMSConnectionFactory(const std::string& brokerURI);
00160
00161 };
00162
00163 }
00164
00165 #endif