util/qos/ConnectQosFactory.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002 Name:      ConnectQosFactory.h
00003 Project:   xmlBlaster.org
00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
00005 Comment:   Factory for org::xmlBlaster::util::qos::ConnectQosData (for org::xmlBlaster::util::qos::ConnectReturnQos and org::xmlBlaster::util::qos::ConnectQos)
00006 ------------------------------------------------------------------------------*/
00007 #ifndef _UTIL_QOS_CONNECTQOSFACTORY_H
00008 #define _UTIL_QOS_CONNECTQOSFACTORY_H
00009 
00010 #include <util/xmlBlasterDef.h>
00011 #include <util/qos/ConnectQos.h>
00012 #include <authentication/SecurityQosFactory.h>
00013 
00040 namespace org { namespace xmlBlaster { namespace util { namespace qos {
00041 
00042 class Dll_Export ConnectQosFactory: public org::xmlBlaster::util::parser::XmlHandlerBase
00043 {
00044 private:
00045    const std::string ME;
00046    org::xmlBlaster::util::qos::SessionQosFactory sessionQosFactory_;
00047    org::xmlBlaster::authentication::SecurityQosFactory securityQosFactory_;
00048    org::xmlBlaster::util::qos::storage::QueuePropertyFactory queuePropertyFactory_;
00049    org::xmlBlaster::util::qos::address::AddressFactory addressFactory_;
00050    std::string serverRefType_;
00051    std::string clientPropertyKey_;
00052 
00053    // helper flags for SAX parsing
00054    bool inSecurityService_;
00055    bool inServerRef_;
00056    bool inSession_;
00057    bool inRefreshSession_;
00058    bool inReconnected_;
00059    bool inInstanceId_;
00060    bool inIsPersistent_; // QosData
00061    bool inClientProperty_;
00062    bool inQos_;
00063 
00064    ClientProperty* clientProperty_;
00065 
00066    org::xmlBlaster::util::qos::ConnectQosDataRef connectQos_;
00068    XmlHandlerBase* subFactory_;
00069 
00070    void prep();
00071 
00072 public:
00073    ConnectQosFactory(org::xmlBlaster::util::Global& global);
00074 
00075    ~ConnectQosFactory();
00076 
00081    void characters(const std::string &ch);
00082 
00089    void startElement(const std::string &name, const org::xmlBlaster::util::parser::AttributeMap& attrs);
00090 
00096    void endElement(const std::string& name);
00097 
00098    org::xmlBlaster::util::qos::ConnectQosDataRef readObject(const std::string& qos);
00099 };
00100 
00101 }}}} // namespaces
00102 
00103 #endif