Author: tabish
Date: Mon Feb 9 15:48:41 2009
New Revision: 742570
URL: http://svn.apache.org/viewvc?rev=742570&view=rev
Log:
Clean some more of the Message classes
Modified:
activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQMessageBase.h
activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQMessageTemplate.h
Modified:
activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQMessageBase.h
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQMessageBase.h?rev=742570&r1=742569&r2=742570&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQMessageBase.h
(original)
+++
activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQMessageBase.h
Mon Feb 9 15:48:41 2009
@@ -41,10 +41,12 @@
class AMQCPP_API ActiveMQMessageBase : public Message {
private:
+ // Used to allow a client to call Message::acknowledge when in the
Client
+ // Ack mode.
core::ActiveMQAckHandler* ackHandler;
- protected: // TODO - Ugly Hack, fix this, protected data is a no-no.
-
+ // Message properties, these are Marshaled and Unmarshaled from the
Message
+ // Command's marshaledProperties vector.
activemq::util::PrimitiveMap properties;
public:
@@ -198,6 +200,19 @@
return false;
}
+ /**
+ * Gets a reference to the Message's Properties object, allows the
derived
+ * classes to get and set their own specific properties.
+ *
+ * @return a reference to the Primitive Map that holds message
properties.
+ */
+ util::PrimitiveMap& getMessageProperties() {
+ return this->properties;
+ }
+ const util::PrimitiveMap& getMessageProperties() const {
+ return this->properties;
+ }
+
};
}}
Modified:
activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQMessageTemplate.h
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQMessageTemplate.h?rev=742570&r1=742569&r2=742570&view=diff
==============================================================================
---
activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQMessageTemplate.h
(original)
+++
activemq/activemq-cpp/trunk/src/main/activemq/commands/ActiveMQMessageTemplate.h
Mon Feb 9 15:48:41 2009
@@ -36,7 +36,7 @@
ActiveMQMessageTemplate() : ActiveMQMessageBase() {
this->propertiesInterceptor.reset(
new wireformat::openwire::utils::MessagePropertyInterceptor(
- this, &this->properties ) );
+ this, &this->getMessageProperties() ) );
}
virtual ~ActiveMQMessageTemplate() {}
@@ -69,7 +69,7 @@
* header values.
*/
virtual void clearProperties() {
- properties.clear();
+ getMessageProperties().clear();
}
/**
@@ -78,7 +78,7 @@
* message.
*/
virtual std::vector<std::string> getPropertyNames() const {
- return properties.getKeys();
+ return getMessageProperties().getKeys();
}
/**
@@ -87,7 +87,7 @@
* @return True if the property exists in this message.
*/
virtual bool propertyExists( const std::string& name ) const {
- return properties.containsKey( name );
+ return getMessageProperties().containsKey( name );
}
/**