00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_UTILS_MESSAGEPROPERTYINTERCEPTOR_H_
00019 #define _ACTIVEMQ_WIREFORMAT_OPENWIRE_UTILS_MESSAGEPROPERTYINTERCEPTOR_H_
00020
00021 #include <activemq/util/Config.h>
00022 #include <activemq/commands/Message.h>
00023 #include <activemq/util/PrimitiveMap.h>
00024 #include <activemq/exceptions/ActiveMQException.h>
00025
00026 #include <decaf/lang/exceptions/NullPointerException.h>
00027
00028 namespace activemq {
00029 namespace wireformat {
00030 namespace openwire {
00031 namespace utils {
00032
00047 class AMQCPP_API MessagePropertyInterceptor {
00048 private:
00049
00050 commands::Message* message;
00051 util::PrimitiveMap* properties;
00052
00053 private:
00054
00055 MessagePropertyInterceptor( const MessagePropertyInterceptor& );
00056 MessagePropertyInterceptor& operator= ( const MessagePropertyInterceptor& );
00057
00058 public:
00059
00069 MessagePropertyInterceptor( commands::Message* message, util::PrimitiveMap* properties );
00070
00071 virtual ~MessagePropertyInterceptor();
00072
00078 virtual bool getBooleanProperty( const std::string& name ) const;
00079
00085 virtual unsigned char getByteProperty( const std::string& name ) const;
00086
00092 virtual double getDoubleProperty( const std::string& name ) const;
00093
00099 virtual float getFloatProperty( const std::string& name ) const;
00100
00106 virtual int getIntProperty( const std::string& name ) const;
00107
00113 virtual long long getLongProperty( const std::string& name ) const;
00114
00120 virtual short getShortProperty( const std::string& name ) const;
00121
00127 virtual std::string getStringProperty( const std::string& name ) const;
00128
00134 virtual void setBooleanProperty( const std::string& name, bool value );
00135
00141 virtual void setByteProperty( const std::string& name, unsigned char value );
00142
00148 virtual void setDoubleProperty( const std::string& name, double value );
00149
00155 virtual void setFloatProperty( const std::string& name, float value );
00156
00162 virtual void setIntProperty( const std::string& name, int value );
00163
00169 virtual void setLongProperty( const std::string& name, long long value );
00170
00176 virtual void setShortProperty( const std::string& name, short value );
00177
00183 virtual void setStringProperty( const std::string& name, const std::string& value );
00184
00185 };
00186
00187 }}}}
00188
00189 #endif