
Inheritance diagram for org::xmlBlaster::client::qos::SubscribeQos:


Public Member Functions | |
| SubscribeQos (org::xmlBlaster::util::Global &global) | |
| SubscribeQos (org::xmlBlaster::util::Global &global, org::xmlBlaster::util::qos::QueryQosData &data) | |
| SubscribeQos (SubscribeQos &qos) | |
| SubscribeQos & | operator= (SubscribeQos &qos) |
| void | setWantInitialUpdate (bool initialUpdate) |
| Do we want to have an initial update on subscribe if the message exists already? | |
| void | setWantUpdateOneway (bool updateOneway) |
Do we want the callback messages of this subscription as oneway with updateOneway() or with the acknowledged update(). | |
| void | setMultiSubscribe (bool multiSubscribe) |
| Are multiple subscribes allowed? Defaults to true. | |
| bool | getMultiSubscribe () |
| void | setWantLocal (bool local) |
| false Inhibit the delivery of messages to myself if i have published it. | |
| void | setWantNotify (bool notifyOnErase) |
| Notify me when the topic is erased on which i have subscribed. | |
| void | setSubscriptionId (std::string &subscriptionId) |
| Force the identifier (unique handle) for this subscription. | |
| std::string | generateSubscriptionId (org::xmlBlaster::util::SessionNameRef sessionName, org::xmlBlaster::client::key::SubscribeKey &subscribeKey) |
| A client side subscriptionId must start with "__subId:" followed by the relative session name. | |
| bool | hasSubscriptionId () |
| void | setPersistent (bool persistent) |
| Sets the subscription to persistent (true) or not persistent (false). | |
| template<typename T_VALUE> | |
| void | addClientProperty (std::string &name, T_VALUE &value, std::string &type="", std::string &encoding="") |
| Add a client property key and value. | |
A full specified subscribe qos could look like this:
<qos>
<id>__subId:/node/heron/client/joe/3/34</id> < Force a subscription ID from client side -->
<meta>false</meta> <!-- Don't send me the xmlKey meta data on updates -->
<content>false</content> <!-- Don't send me the content data on updates (notify only) -->
<local>false</local> <!-- Inhibit the delivery of messages to myself if i have published it -->
<initialUpdate>false</initialUpdate>;
<updateOneway>false</updateOneway>;
<filter type='myPlugin' version='1.0'>a!=100</filter>
<!-- Filters messages i have subscribed as implemented in your plugin -->
<history numEntries='20'/> <!-- Default is to deliver the current entry (numEntries='1'), '-1' deliver all -->
</qos>
see xmlBlaster/src/dtd/XmlQoS.xml
org.xmlBlaster.util.qos.QueryQosSaxFactory
Definition at line 41 of file SubscribeQos.h.
| org::xmlBlaster::client::qos::SubscribeQos::SubscribeQos | ( | org::xmlBlaster::util::Global & | global | ) |
Definition at line 25 of file SubscribeQos.cpp.
References org::xmlBlaster::client::qos::UnSubscribeQos::ME.
| org::xmlBlaster::client::qos::SubscribeQos::SubscribeQos | ( | org::xmlBlaster::util::Global & | global, | |
| org::xmlBlaster::util::qos::QueryQosData & | data | |||
| ) |
Definition at line 30 of file SubscribeQos.cpp.
References org::xmlBlaster::client::qos::UnSubscribeQos::ME.
| org::xmlBlaster::client::qos::SubscribeQos::SubscribeQos | ( | SubscribeQos & | qos | ) |
Definition at line 36 of file SubscribeQos.cpp.
| SubscribeQos & org::xmlBlaster::client::qos::SubscribeQos::operator= | ( | SubscribeQos & | qos | ) |
Definition at line 40 of file SubscribeQos.cpp.
References org::xmlBlaster::client::qos::UnSubscribeQos::data_.
| void org::xmlBlaster::client::qos::SubscribeQos::setWantInitialUpdate | ( | bool | initialUpdate | ) |
Do we want to have an initial update on subscribe if the message exists already?
Definition at line 55 of file SubscribeQos.cpp.
References org::xmlBlaster::client::qos::UnSubscribeQos::data_, and org::xmlBlaster::util::qos::QueryQosData::setWantInitialUpdate().
Referenced by SubscribeDemo::subscribe().
| void org::xmlBlaster::client::qos::SubscribeQos::setWantUpdateOneway | ( | bool | updateOneway | ) |
Do we want the callback messages of this subscription as oneway with updateOneway() or with the acknowledged update().
| updateOneway | Defaults to false. |
QueryQosData::setWantUpdateOneway(boolean)
Definition at line 67 of file SubscribeQos.cpp.
References org::xmlBlaster::client::qos::UnSubscribeQos::data_, and org::xmlBlaster::util::qos::QueryQosData::setWantUpdateOneway().
Referenced by SubscribeDemo::subscribe().
| void org::xmlBlaster::client::qos::SubscribeQos::setMultiSubscribe | ( | bool | multiSubscribe | ) |
Are multiple subscribes allowed? Defaults to true.
| multiSubscribe | defaults to true |
Definition at line 78 of file SubscribeQos.cpp.
References org::xmlBlaster::client::qos::UnSubscribeQos::data_, and org::xmlBlaster::util::qos::QueryQosData::setMultiSubscribe().
Referenced by HelloWorld2::execute(), and SubscribeDemo::subscribe().
| bool org::xmlBlaster::client::qos::SubscribeQos::getMultiSubscribe | ( | ) |
Definition at line 110 of file SubscribeQos.cpp.
References org::xmlBlaster::client::qos::UnSubscribeQos::data_, and org::xmlBlaster::util::qos::QueryQosData::getMultiSubscribe().
Referenced by generateSubscriptionId(), and org::xmlBlaster::client::XmlBlasterAccess::subscribe().
| void org::xmlBlaster::client::qos::SubscribeQos::setWantLocal | ( | bool | local | ) |
false Inhibit the delivery of messages to myself if i have published it.
Definition at line 86 of file SubscribeQos.cpp.
References org::xmlBlaster::client::qos::UnSubscribeQos::data_, and org::xmlBlaster::util::qos::QueryQosData::setWantLocal().
Referenced by SubscribeDemo::subscribe().
| void org::xmlBlaster::client::qos::SubscribeQos::setWantNotify | ( | bool | notifyOnErase | ) |
Notify me when the topic is erased on which i have subscribed.
| notifyOnErase | defaults to true |
Definition at line 91 of file SubscribeQos.cpp.
References org::xmlBlaster::client::qos::UnSubscribeQos::data_, and org::xmlBlaster::util::qos::QueryQosData::setWantNotify().
Referenced by SubscribeDemo::subscribe().
| void org::xmlBlaster::client::qos::SubscribeQos::setSubscriptionId | ( | std::string & | subscriptionId | ) |
Force the identifier (unique handle) for this subscription.
Usually you let the identifier be generated by xmlBlaster. The call is handled as 'logically const'
Referenced by generateSubscriptionId(), and org::xmlBlaster::util::dispatch::ConnectionsHandler::queueSubscribe().
| std::string org::xmlBlaster::client::qos::SubscribeQos::generateSubscriptionId | ( | org::xmlBlaster::util::SessionNameRef | sessionName, | |
| org::xmlBlaster::client::key::SubscribeKey & | subscribeKey | |||
| ) |
A client side subscriptionId must start with "__subId:" followed by the relative session name.
This us only useful for positive session Ids in fail save environments: if the subscription is queued the faked subscriptionId will be used later by the server
| sessionName | ||
| subscribeKey |
Definition at line 114 of file SubscribeQos.cpp.
References org::xmlBlaster::client::qos::UnSubscribeQos::data_, org::xmlBlaster::util::TimestampFactory::getInstance, getMultiSubscribe(), org::xmlBlaster::util::qos::QueryQosData::getSubscriptionId(), org::xmlBlaster::util::TimestampFactory::getTimestamp(), org::xmlBlaster::client::key::UnSubscribeKey::getUrl(), org::xmlBlaster::util::lexical_cast(), org::xmlBlaster::util::StringTrim::replaceAll(), setSubscriptionId(), and org::xmlBlaster::util::Constants::SUBSCRIPTIONID_PREFIX.
Referenced by org::xmlBlaster::util::dispatch::ConnectionsHandler::queueSubscribe().
| bool org::xmlBlaster::client::qos::SubscribeQos::hasSubscriptionId | ( | ) |
Definition at line 106 of file SubscribeQos.cpp.
References org::xmlBlaster::client::qos::UnSubscribeQos::data_, and org::xmlBlaster::util::qos::QueryQosData::getSubscriptionId().
Referenced by org::xmlBlaster::client::XmlBlasterAccess::subscribe().
| void org::xmlBlaster::client::qos::SubscribeQos::setPersistent | ( | bool | persistent | ) |
Sets the subscription to persistent (true) or not persistent (false).
Setting this to true means that the subscription will implicitly make the associated session persistent and both will survive a server crash.
Definition at line 142 of file SubscribeQos.cpp.
References org::xmlBlaster::client::qos::UnSubscribeQos::data_, and org::xmlBlaster::util::qos::QosData::setPersistent().
Referenced by SubscribeDemo::subscribe().
| void org::xmlBlaster::client::qos::SubscribeQos::addClientProperty | ( | std::string & | name, | |
| T_VALUE & | value, | |||
| std::string & | type = "", |
|||
| std::string & | encoding = "" | |||
| ) |
Add a client property key and value.
| name | The unique key, a duplicate key will overwrite the old setting | |
| value | "vector<unsigned char>" and "unsigned char *" types are treated as a blob |
Reimplemented from org::xmlBlaster::client::qos::GetQos.
Definition at line 125 of file SubscribeQos.h.