util/queue/QueueFactory.h

Go to the documentation of this file.
00001 /*-----------------------------------------------------------------------------
00002 Name:      QueueFactory.h
00003 Project:   xmlBlaster.org
00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
00005 Comment:   Factory to create different queue implementations
00006 -----------------------------------------------------------------------------*/
00007 
00008 #ifndef _UTIL_PARSER_PARSERFACTORY_H
00009 #define _UTIL_PARSER_PARSERFACTORY_H
00010 
00011 #include <util/xmlBlasterDef.h>
00012 #include <util/queue/I_Queue.h>
00013 #include <util/qos/storage/QueuePropertyBase.h>
00014 #include <util/Global.h>
00015 
00016 namespace org { namespace xmlBlaster { namespace util { namespace queue {
00017     
00027 class Dll_Export QueueFactory {
00028    friend class org::xmlBlaster::util::Global; // g++ 2.95.3 warning: `class org::xmlBlaster::util::queue::QueueFactory' only defines private constructors and has no friends
00029 
00030    private:
00031    const std::string ME;
00032    static QueueFactory* factory_;
00033    
00034    QueueFactory();
00035    QueueFactory(const QueueFactory& factory);
00036    QueueFactory& operator =(const QueueFactory& factory);
00037 
00038    public:
00039    ~QueueFactory();
00040 
00045    static QueueFactory& getFactory();
00046 
00055    I_Queue& getPlugin(org::xmlBlaster::util::Global& global, const org::xmlBlaster::util::qos::storage::QueuePropertyBase& property,
00056                       const std::string& type="", const std::string& version="");
00057 
00061    void releasePlugin(I_Queue *queueP); /*const std::string& type="RAM", const std::string& version="1.0");*/
00062 };
00063 
00064 }}}} // namespace
00065 
00066 #endif