util/qos/MsgQosFactory.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002 Name:      MsgQosSaxFactory.h
00003 Project:   xmlBlaster.org
00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
00005 ------------------------------------------------------------------------------*/
00006 
00018 #ifndef _UTIL_QOS_MSGQOSFACTORY_H
00019 #define _UTIL_QOS_MSGQOSFACTORY_H
00020 
00021 #include <util/parser/XmlHandlerBase.h>
00022 #include <util/Destination.h>
00023 #include <util/qos/MsgQosData.h>
00024 #include <util/SessionName.h>
00025 #include <util/cluster/RouteInfo.h>
00026 #include <string>
00027 #include <util/qos/storage/QueuePropertyFactory.h>
00028 
00029 
00030 
00031 namespace org { namespace xmlBlaster { namespace util { namespace qos {
00032 
00033 class Dll_Export MsgQosFactory : public parser::XmlHandlerBase
00034 {
00035 private:
00036    std::string          ME;
00037    MsgQosData*          msgQosDataP_;
00038    Destination          destination_;
00039    org::xmlBlaster::util::cluster::RouteInfo routeInfo_;
00040    org::xmlBlaster::util::qos::storage::QueuePropertyFactory queuePropertyFactory_;
00041 
00043    bool inState_; // QosData
00044    bool inSubscribe_;
00045    bool inRedeliver_;
00046    bool inTopic_;
00047    bool inQueue_;
00048    bool inPersistence_;
00049    bool inDestination_;
00050    bool inSender_;
00051    bool inPriority_;
00052    bool inClientProperty_;
00053    bool inExpiration_;
00054    bool inRcvTimestamp_; // QosData
00055    bool inIsVolatile_;
00056    bool inIsPersistent_; // QosData
00057    bool inReadonly_;
00058    bool inRoute_;  // QosData
00059    bool sendRemainingLife_;
00060    bool inQos_;
00061 
00062    std::string LIFE_TIME;
00063    std::string FORCE_DESTROY;
00064    std::string REMAINING_LIFE;
00065    std::string READ_ONLY;
00066    std::string DESTROY_DELAY;
00067    std::string CREATE_DOM_ENTRY;
00068    std::string NANOS;
00069    std::string ID;
00070    std::string STRATUM;
00071    std::string TIMESTAMP;
00072    std::string DIRTY_READ;
00073    std::string INDEX;
00074    std::string SIZE;
00075 
00076    ClientProperty* clientProperty_;
00077 
00078    // Private copy ctor and assignement
00079    MsgQosFactory(const MsgQosFactory& data);
00080    MsgQosFactory& operator=(const MsgQosFactory& data);
00081 
00082 public:
00086    MsgQosFactory(org::xmlBlaster::util::Global& global);
00087 
00088    ~MsgQosFactory();
00089 
00095    MsgQosData readObject(const std::string& xmlQos);
00096 
00103    void startElement(const std::string &name, const parser::AttributeMap& attrs);
00104 
00112    void characters(const std::string &ch);
00113 
00119    void endElement(const std::string &name);
00120 
00122    void sendRemainingLife(bool sendRemainingLife);
00123    
00124    bool sendRemainingLife();
00125 
00126 };
00127 
00128 }}}}
00129 
00130 #endif
00131