Public Member Functions | ||||
MsgQosData (org::xmlBlaster::util::Global &global, std::string &serialData="") | ||||
Constructs the specialized quality of service object for a publish() or update() call. | ||||
MsgQosData (MsgQosData &data) | ||||
MsgQosData & | operator= (MsgQosData &data) | |||
virtual | ~MsgQosData () | |||
void | setSubscribable (bool isSubcribeable) | |||
| ||||
bool | isSubscribable () | |||
Test if Publish/Subscribe style is used for PtP messages. | ||||
bool | isPtp () | |||
Test if Point to Point addressing style is used. | ||||
void | setVolatile (bool volatileFlag) | |||
| ||||
bool | isVolatile () | |||
| ||||
bool | isVolatileDefault () | |||
| ||||
void | setSubscriptionId (std::string &subscriptionId) | |||
If Pub/Sub style update: contains the subscribe ID which caused this update. | ||||
std::string | getSubscriptionId () | |||
If Pub/Sub style update: contains the subscribe ID which caused this update. | ||||
void | setForceUpdate (bool forceUpdate) | |||
Send message to subscriber even if the content is the same as the previous. | ||||
bool | isForceUpdate () | |||
| ||||
void | setReadonly (bool readonly) | |||
| ||||
bool | isReadonly () | |||
| ||||
void | setRedeliver (int redeliver) | |||
Set > 0 if the message probably is redelivered (number of retries). | ||||
void | incrRedeliver () | |||
Increment the redeliver counter. | ||||
int | getRedeliver () | |||
Returns > 0 if the message probably is redelivered. | ||||
void | setQueueSize (long queueSize) | |||
| ||||
long | getQueueSize () | |||
| ||||
void | setQueueIndex (long queueIndex) | |||
| ||||
long | getQueueIndex () | |||
| ||||
long | getLifeTime () | |||
The life time of the message or -1L if forever. | ||||
void | setLifeTime (long lifeTime) | |||
The life time of the message or -1L if forever. | ||||
long | getRemainingLife () | |||
| ||||
long | getRemainingLifeStatic () | |||
This is the value delivered in the QoS (as it was calculated by the server on sending) and is NOT dynamically recalculated. | ||||
void | setRemainingLifeStatic (long remainingLifeStatic) | |||
bool | isExpired () | |||
Calculates if we are expired. | ||||
long | getMaxLifeTime () | |||
The server default for max. | ||||
std::string | getXmlRcvTimestamp () | |||
Tagged form of message receive, e.g. | ||||
void | touchRcvTimestamp () | |||
Set timestamp to current time. | ||||
std::vector< Destination > | getDestinations () | |||
Get all the destinations of this message. | ||||
void | addDestination (Destination &destination) | |||
Add a destination. | ||||
virtual std::string | toXml (bool clearText, std::string &extraOffset="") | |||
Dump state of this object into a XML ASCII std::string. | ||||
virtual std::string | toXml (std::string &extraOffset="") | |||
Dump state of this object into a XML ASCII std::string. | ||||
virtual MsgQosData * | getClone () | |||
Allocate a clone, the derived classes need to implement this method. | ||||
void | setTopicProperty (org::xmlBlaster::util::qos::TopicProperty &prop) | |||
org::xmlBlaster::util::qos::TopicProperty | getTopicProperty () | |||
bool | hasTopicProperty () | |||
void | setForceDestroy (bool forceDestroy) | |||
Control message life cycle on message expiry. | ||||
bool | isForceDestroy () | |||
Protected Member Functions | ||||
void | copy (MsgQosData &data) | |||
Protected Attributes | ||||
std::vector< Destination > | destinationList_ | |||
ArrayList for loginQoS, holding all destination addresses (Destination objects). | ||||
bool | receiveTimestampHumanReadable_ |
Definition at line 47 of file MsgQosData.h.
org::xmlBlaster::util::qos::MsgQosData::MsgQosData | ( | org::xmlBlaster::util::Global & | global, | |
std::string & | serialData = "" | |||
) |
Constructs the specialized quality of service object for a publish() or update() call.
The | factory which knows how to serialize and parse me |
Referenced by getClone().
org::xmlBlaster::util::qos::MsgQosData::MsgQosData | ( | MsgQosData & | data | ) |
org::xmlBlaster::util::qos::MsgQosData::~MsgQosData | ( | ) | [virtual] |
Definition at line 111 of file MsgQosData.cpp.
void org::xmlBlaster::util::qos::MsgQosData::copy | ( | MsgQosData & | data | ) | [protected] |
Definition at line 62 of file MsgQosData.cpp.
References org::xmlBlaster::util::qos::QosData::copy(), forceDestroy_, forceUpdate_, isExpired_, lifeTime_, maxLifeTime_, queueIndex_, queueSize_, receiveTimestampHumanReadable_, redeliver_, remainingLifeStatic_, subscribable_, subscriptionId_, and topicProperty_.
Referenced by MsgQosData(), and operator=().
MsgQosData & org::xmlBlaster::util::qos::MsgQosData::operator= | ( | MsgQosData & | data | ) |
Definition at line 102 of file MsgQosData.cpp.
References copy(), org::xmlBlaster::util::qos::QosData::copy(), and destinationList_.
void org::xmlBlaster::util::qos::MsgQosData::setSubscribable | ( | bool | isSubcribeable | ) |
isSubscribable | if false PtP messages are invisible for subscriptions |
isSubscribable | true if Publish/Subscribe style is used false Only possible for PtP messages to keep PtP secret (you can't subscribe them) |
Definition at line 119 of file MsgQosData.cpp.
Referenced by org::xmlBlaster::client::qos::PublishQos::setSubscribable().
bool org::xmlBlaster::util::qos::MsgQosData::isSubscribable | ( | ) |
Test if Publish/Subscribe style is used for PtP messages.
Definition at line 124 of file MsgQosData.cpp.
References org::xmlBlaster::util::Prop< T >::getValue().
Referenced by org::xmlBlaster::client::qos::UpdateQos::isSubscribable().
bool org::xmlBlaster::util::qos::MsgQosData::isPtp | ( | ) |
Test if Point to Point addressing style is used.
Definition at line 129 of file MsgQosData.cpp.
References destinationList_.
Referenced by org::xmlBlaster::client::qos::UpdateQos::isPtp().
void org::xmlBlaster::util::qos::MsgQosData::setVolatile | ( | bool | volatileFlag | ) |
volatile | true/false |
Definition at line 151 of file MsgQosData.cpp.
References setForceDestroy(), setLifeTime(), and setRemainingLifeStatic().
Referenced by org::xmlBlaster::client::qos::PublishQos::setVolatile().
bool org::xmlBlaster::util::qos::MsgQosData::isVolatile | ( | ) |
Definition at line 163 of file MsgQosData.cpp.
References getLifeTime(), and isForceDestroy().
Referenced by org::xmlBlaster::client::qos::PublishQos::isVolatile(), and org::xmlBlaster::client::qos::GetReturnQos::isVolatile().
bool org::xmlBlaster::util::qos::MsgQosData::isVolatileDefault | ( | ) |
void org::xmlBlaster::util::qos::MsgQosData::setSubscriptionId | ( | std::string & | subscriptionId | ) |
If Pub/Sub style update: contains the subscribe ID which caused this update.
subscriptionId | null if PtP message |
string org::xmlBlaster::util::qos::MsgQosData::getSubscriptionId | ( | ) |
If Pub/Sub style update: contains the subscribe ID which caused this update.
Definition at line 181 of file MsgQosData.cpp.
Referenced by org::xmlBlaster::client::qos::UpdateQos::getSubscriptionId().
void org::xmlBlaster::util::qos::MsgQosData::setForceUpdate | ( | bool | forceUpdate | ) |
Send message to subscriber even if the content is the same as the previous.
forceUpdate |
Definition at line 190 of file MsgQosData.cpp.
References org::xmlBlaster::util::CREATED_BY_SETTER, and org::xmlBlaster::util::Prop< T >::setValue().
Referenced by org::xmlBlaster::client::qos::PublishQos::setForceUpdate().
bool org::xmlBlaster::util::qos::MsgQosData::isForceUpdate | ( | ) |
Definition at line 198 of file MsgQosData.cpp.
References org::xmlBlaster::util::Prop< T >::getValue().
void org::xmlBlaster::util::qos::MsgQosData::setReadonly | ( | bool | readonly | ) |
Definition at line 135 of file MsgQosData.cpp.
References org::xmlBlaster::util::qos::QosData::global_, and org::xmlBlaster::util::qos::TopicProperty::setReadonly().
Referenced by org::xmlBlaster::client::qos::PublishQos::setReadonly().
bool org::xmlBlaster::util::qos::MsgQosData::isReadonly | ( | ) |
Definition at line 142 of file MsgQosData.cpp.
References org::xmlBlaster::util::qos::TopicProperty::isReadonly().
Referenced by org::xmlBlaster::client::qos::GetReturnQos::isReadonly().
void org::xmlBlaster::util::qos::MsgQosData::setRedeliver | ( | int | redeliver | ) |
Set > 0 if the message probably is redelivered (number of retries).
redeliver | if == 0 The message is guaranteed to be delivered only once. |
Definition at line 207 of file MsgQosData.cpp.
void org::xmlBlaster::util::qos::MsgQosData::incrRedeliver | ( | ) |
int org::xmlBlaster::util::qos::MsgQosData::getRedeliver | ( | ) |
Returns > 0 if the message probably is redelivered.
Definition at line 224 of file MsgQosData.cpp.
Referenced by org::xmlBlaster::client::qos::UpdateQos::getRedeliver().
void org::xmlBlaster::util::qos::MsgQosData::setQueueSize | ( | long | queueSize | ) |
long org::xmlBlaster::util::qos::MsgQosData::getQueueSize | ( | ) |
Definition at line 240 of file MsgQosData.cpp.
Referenced by org::xmlBlaster::client::qos::UpdateQos::getQueueSize().
void org::xmlBlaster::util::qos::MsgQosData::setQueueIndex | ( | long | queueIndex | ) |
queueIndex | The index of the message in the queue |
Definition at line 248 of file MsgQosData.cpp.
long org::xmlBlaster::util::qos::MsgQosData::getQueueIndex | ( | ) |
Definition at line 256 of file MsgQosData.cpp.
Referenced by org::xmlBlaster::client::qos::UpdateQos::getQueueIndex().
long org::xmlBlaster::util::qos::MsgQosData::getLifeTime | ( | ) |
The life time of the message or -1L if forever.
Definition at line 264 of file MsgQosData.cpp.
Referenced by getRemainingLife(), and isVolatile().
void org::xmlBlaster::util::qos::MsgQosData::setLifeTime | ( | long | lifeTime | ) |
The life time of the message or -1L if forever.
Definition at line 272 of file MsgQosData.cpp.
Referenced by org::xmlBlaster::client::qos::PublishQos::setLifeTime(), and setVolatile().
long org::xmlBlaster::util::qos::MsgQosData::getRemainingLife | ( | ) |
Definition at line 281 of file MsgQosData.cpp.
References org::xmlBlaster::util::TimestampFactory::getInstance, getLifeTime(), org::xmlBlaster::util::qos::QosData::getRcvTimestamp(), and org::xmlBlaster::util::TimestampFactory::getTimestamp().
Referenced by isExpired().
long org::xmlBlaster::util::qos::MsgQosData::getRemainingLifeStatic | ( | ) |
This is the value delivered in the QoS (as it was calculated by the server on sending) and is NOT dynamically recalculated.
So trust this value only if your client clock is out of date (or not trusted) and if you know the message sending latency is not too big.
Definition at line 300 of file MsgQosData.cpp.
Referenced by org::xmlBlaster::client::qos::GetReturnQos::getRemainingLifeStatic().
void org::xmlBlaster::util::qos::MsgQosData::setRemainingLifeStatic | ( | long | remainingLifeStatic | ) |
bool org::xmlBlaster::util::qos::MsgQosData::isExpired | ( | ) |
Calculates if we are expired.
Definition at line 313 of file MsgQosData.cpp.
References getRemainingLife().
long org::xmlBlaster::util::qos::MsgQosData::getMaxLifeTime | ( | ) |
The server default for max.
span of life, adjustable with property "message.maxLifeTime"
Definition at line 330 of file MsgQosData.cpp.
std::string org::xmlBlaster::util::qos::MsgQosData::getXmlRcvTimestamp | ( | ) |
Tagged form of message receive, e.g.
:
<rcvTimestamp nanos='1007764305862000004'/>
void org::xmlBlaster::util::qos::MsgQosData::touchRcvTimestamp | ( | ) |
vector< Destination > org::xmlBlaster::util::qos::MsgQosData::getDestinations | ( | ) |
Get all the destinations of this message.
This should only be used with PTP style messaging
Check if (isPtp()) ...
before calling this method
Definition at line 343 of file MsgQosData.cpp.
References destinationList_.
void org::xmlBlaster::util::qos::MsgQosData::addDestination | ( | Destination & | destination | ) |
Add a destination.
The destination is copied into a list - your instance can be savly disappear
Definition at line 351 of file MsgQosData.cpp.
References destinationList_.
Referenced by org::xmlBlaster::client::qos::PublishQos::addDestination().
virtual std::string org::xmlBlaster::util::qos::MsgQosData::toXml | ( | bool | clearText, | |
std::string & | extraOffset = "" | |||
) | [virtual] |
Dump state of this object into a XML ASCII std::string.
clearText | Dump base64 clientProperties encoded as plain text | |
extraOffset | indenting of tags for nice output |
Referenced by org::xmlBlaster::client::qos::PublishQos::toXml().
virtual std::string org::xmlBlaster::util::qos::MsgQosData::toXml | ( | std::string & | extraOffset = "" |
) | [virtual] |
Dump state of this object into a XML ASCII std::string.
Needs to be implemented by derived classes.
extraOffset | indenting of tags for nice output |
Reimplemented from org::xmlBlaster::util::qos::QosData.
MsgQosData * org::xmlBlaster::util::qos::MsgQosData::getClone | ( | ) | [virtual] |
Allocate a clone, the derived classes need to implement this method.
Reimplemented from org::xmlBlaster::util::qos::QosData.
Definition at line 440 of file MsgQosData.cpp.
References MsgQosData().
void org::xmlBlaster::util::qos::MsgQosData::setTopicProperty | ( | org::xmlBlaster::util::qos::TopicProperty & | prop | ) |
Definition at line 445 of file MsgQosData.cpp.
Referenced by org::xmlBlaster::client::qos::PublishQos::setTopicProperty().
TopicProperty org::xmlBlaster::util::qos::MsgQosData::getTopicProperty | ( | ) |
Definition at line 454 of file MsgQosData.cpp.
References org::xmlBlaster::util::qos::QosData::global_.
bool org::xmlBlaster::util::qos::MsgQosData::hasTopicProperty | ( | ) |
Definition at line 461 of file MsgQosData.cpp.
void org::xmlBlaster::util::qos::MsgQosData::setForceDestroy | ( | bool | forceDestroy | ) |
Control message life cycle on message expiry.
forceDestroy | true Force message destroy on message expire false On message expiry messages which are already in callback queues are delivered. |
Definition at line 472 of file MsgQosData.cpp.
References org::xmlBlaster::util::CREATED_BY_SETTER, and org::xmlBlaster::util::Prop< T >::setValue().
Referenced by org::xmlBlaster::client::qos::PublishQos::setForceDestroy(), and setVolatile().
bool org::xmlBlaster::util::qos::MsgQosData::isForceDestroy | ( | ) |
Definition at line 467 of file MsgQosData.cpp.
References org::xmlBlaster::util::Prop< T >::getValue().
Referenced by isVolatile().
std::vector<Destination> org::xmlBlaster::util::qos::MsgQosData::destinationList_ [protected] |
ArrayList for loginQoS, holding all destination addresses (Destination objects).
Definition at line 104 of file MsgQosData.h.
Referenced by addDestination(), getDestinations(), isPtp(), and operator=().