18 #ifndef _ACTIVEMQ_COMMANDS_ACTIVEMQMESSAGETEMPLATE_H_
19 #define _ACTIVEMQ_COMMANDS_ACTIVEMQMESSAGETEMPLATE_H_
44 std::auto_ptr<wireformat::openwire::utils::MessagePropertyInterceptor> propertiesInterceptor;
59 this->getAckHandler()->acknowledgeMessage(
this);
65 this->setReadOnlyBody(
true);
66 this->setReadOnlyProperties(
true);
86 return thisMsgId !=
NULL && otherMsgId !=
NULL && otherMsgId->equals(thisMsgId.
get());
93 this->setContent(std::vector<unsigned char>());
94 this->setReadOnlyBody(
false);
101 this->getMessageProperties().clear();
102 this->setReadOnlyProperties(
false);
109 return getMessageProperties().keySet().toArray();
116 return getMessageProperties().containsKey(name);
162 return this->propertiesInterceptor->getBooleanProperty(name);
171 return this->propertiesInterceptor->getByteProperty(name);
181 return this->propertiesInterceptor->getDoubleProperty(name);
191 return this->propertiesInterceptor->getFloatProperty(name);
201 return this->propertiesInterceptor->getIntProperty(name);
211 return this->propertiesInterceptor->getLongProperty(name);
221 return this->propertiesInterceptor->getShortProperty(name);
231 return this->propertiesInterceptor->getStringProperty(name);
244 failIfReadOnlyProperties();
246 this->propertiesInterceptor->setBooleanProperty(name, value);
257 failIfReadOnlyProperties();
259 this->propertiesInterceptor->setByteProperty(name, value);
270 failIfReadOnlyProperties();
272 this->propertiesInterceptor->setDoubleProperty(name, value);
283 failIfReadOnlyProperties();
285 this->propertiesInterceptor->setFloatProperty(name, value);
296 failIfReadOnlyProperties();
298 this->propertiesInterceptor->setIntProperty(name, value);
309 failIfReadOnlyProperties();
311 this->propertiesInterceptor->setLongProperty(name, value);
322 failIfReadOnlyProperties();
324 this->propertiesInterceptor->setShortProperty(name, value);
335 failIfReadOnlyProperties();
337 this->propertiesInterceptor->setStringProperty(name, value);
343 return this->getCorrelationId();
347 this->setCorrelationId(correlationId);
351 return !this->isPersistent();
359 return dynamic_cast<const cms::Destination*
> (this->getDestination().get());
365 if (destination !=
NULL) {
367 dynamic_cast<ActiveMQDestination*> (destination->
clone())));
369 this->getDestination().reset(
NULL);
376 return this->getExpiration();
380 this->setExpiration(expireTime);
394 return this->getPriority();
398 this->setPriority((
unsigned char) priority);
402 return this->getRedeliveryCounter() != 0;
415 if (destination !=
NULL) {
417 dynamic_cast<ActiveMQDestination*> (destination->
clone())));
426 return this->getTimestamp();
430 this->setTimestamp(timeStamp);
434 return this->getType();
444 if (!this->isReadOnlyBody()) {
450 if (this->isReadOnlyBody()) {
456 if (this->isReadOnlyProperties()) {