18 #ifndef _ACTIVEMQ_COMMANDS_MESSAGE_H_
19 #define _ACTIVEMQ_COMMANDS_MESSAGE_H_
23 #pragma warning( disable : 4290 )
43 class ActiveMQAckHandler;
44 class ActiveMQConnection;
83 std::vector< decaf::lang::Pointer<BrokerId> >
brokerPath;
88 std::vector< decaf::lang::Pointer<BrokerId> >
cluster;
95 const static unsigned char ID_MESSAGE = 0;
108 bool readOnlyProperties;
117 static const unsigned int DEFAULT_MESSAGE_SIZE = 1024;
130 virtual unsigned char getDataStructureType()
const;
132 virtual Message* cloneDataStructure()
const;
136 virtual std::string toString()
const;
182 this->ackHandler = handler;
191 return this->ackHandler;
200 this->connection = connection;
209 return this->connection;
216 virtual unsigned int getSize()
const;
223 virtual bool isExpired()
const;
237 return this->properties;
240 return this->properties;
248 return this->readOnlyProperties;
256 this->readOnlyProperties = value;
264 return this->readOnlyBody;
272 this->readOnlyBody = value;
299 virtual const std::string& getGroupID()
const;
300 virtual std::string& getGroupID();
301 virtual void setGroupID(
const std::string& groupID);
303 virtual int getGroupSequence()
const;
304 virtual void setGroupSequence(
int groupSequence);
306 virtual const std::string& getCorrelationId()
const;
307 virtual std::string& getCorrelationId();
308 virtual void setCorrelationId(
const std::string& correlationId);
310 virtual bool isPersistent()
const;
311 virtual void setPersistent(
bool persistent);
313 virtual long long getExpiration()
const;
314 virtual void setExpiration(
long long expiration);
316 virtual unsigned char getPriority()
const;
317 virtual void setPriority(
unsigned char priority);
323 virtual long long getTimestamp()
const;
324 virtual void setTimestamp(
long long timestamp);
326 virtual const std::string& getType()
const;
327 virtual std::string& getType();
328 virtual void setType(
const std::string& type);
330 virtual const std::vector<unsigned char>& getContent()
const;
331 virtual std::vector<unsigned char>& getContent();
332 virtual void setContent(
const std::vector<unsigned char>& content);
334 virtual const std::vector<unsigned char>& getMarshalledProperties()
const;
335 virtual std::vector<unsigned char>& getMarshalledProperties();
336 virtual void setMarshalledProperties(
const std::vector<unsigned char>& marshalledProperties);
346 virtual bool isCompressed()
const;
347 virtual void setCompressed(
bool compressed);
349 virtual int getRedeliveryCounter()
const;
350 virtual void setRedeliveryCounter(
int redeliveryCounter);
352 virtual const std::vector< decaf::lang::Pointer<BrokerId> >& getBrokerPath()
const;
353 virtual std::vector< decaf::lang::Pointer<BrokerId> >& getBrokerPath();
356 virtual long long getArrival()
const;
357 virtual void setArrival(
long long arrival);
359 virtual const std::string& getUserID()
const;
360 virtual std::string& getUserID();
361 virtual void setUserID(
const std::string& userID);
363 virtual bool isRecievedByDFBridge()
const;
364 virtual void setRecievedByDFBridge(
bool recievedByDFBridge);
366 virtual bool isDroppable()
const;
367 virtual void setDroppable(
bool droppable);
369 virtual const std::vector< decaf::lang::Pointer<BrokerId> >& getCluster()
const;
370 virtual std::vector< decaf::lang::Pointer<BrokerId> >& getCluster();
373 virtual long long getBrokerInTime()
const;
374 virtual void setBrokerInTime(
long long brokerInTime);
376 virtual long long getBrokerOutTime()
const;
377 virtual void setBrokerOutTime(
long long brokerOutTime);
379 virtual bool isJMSXGroupFirstForConsumer()
const;
380 virtual void setJMSXGroupFirstForConsumer(
bool jMSXGroupFirstForConsumer);
const util::PrimitiveMap & getMessageProperties() const
Definition: Message.h:239
virtual bool isMarshalAware() const
Indicates that this command is aware of Marshaling, and needs to have its Marshaling methods invoked...
Definition: Message.h:172
virtual void onSend()
Allows derived Message classes to perform tasks before a message is sent.
Definition: Message.h:228
std::vector< unsigned char > content
Definition: Message.h:77
virtual Pointer< core::ActiveMQAckHandler > getAckHandler() const
Gets the Acknowledgment Handler that this Message will use when the Acknowledge method is called...
Definition: Message.h:190
Pointer< ConsumerId > targetConsumerId
Definition: Message.h:80
std::string userID
Definition: Message.h:85
#define AMQCPP_API
Definition: Config.h:30
Pointer< TransactionId > originalTransactionId
Definition: Message.h:67
int redeliveryCounter
Definition: Message.h:82
Pointer< ProducerId > producerId
Definition: Message.h:62
long long expiration
Definition: Message.h:72
Pointer< ActiveMQDestination > destination
Definition: Message.h:63
bool compressed
Definition: Message.h:81
bool jMSXGroupFirstForConsumer
Definition: Message.h:91
Pointer< MessageId > messageId
Definition: Message.h:66
core::ActiveMQConnection * getConnection() const
Gets the ActiveMQConnection instance that this Command was created from when the session create metho...
Definition: Message.h:208
Pointer< Message > copy() const
Create a Pointer based copy of this message.
Definition: Message.h:148
void setConnection(core::ActiveMQConnection *connection)
Sets the ActiveMQConnection instance that this Command was created from when the session create metho...
Definition: Message.h:199
bool persistent
Definition: Message.h:71
Definition: DataStructure.h:27
virtual bool isMessage() const
Definition: Message.h:385
Interface for an Object that can visit the various Command Objects that are sent from and to this cli...
Definition: CommandVisitor.h:69
std::vector< decaf::lang::Pointer< BrokerId > > brokerPath
Definition: Message.h:83
Pointer< ActiveMQDestination > originalDestination
Definition: Message.h:65
std::string type
Definition: Message.h:76
Definition: BaseCommand.h:27
bool isReadOnlyBody() const
Returns if the Message Body is Read Only.
Definition: Message.h:263
core::ActiveMQConnection * connection
Definition: Message.h:115
Pointer< ActiveMQDestination > replyTo
Definition: Message.h:74
Map of named primitives.
Definition: PrimitiveMap.h:36
long long brokerOutTime
Definition: Message.h:90
std::string correlationId
Definition: Message.h:70
unsigned char priority
Definition: Message.h:73
Pointer< DataStructure > dataStructure
Definition: Message.h:79
long long timestamp
Definition: Message.h:75
bool recievedByDFBridge
Definition: Message.h:86
void setReadOnlyBody(bool value)
Set the Read Only State of the Message Content.
Definition: Message.h:271
long long brokerInTime
Definition: Message.h:89
long long arrival
Definition: Message.h:84
std::string groupID
Definition: Message.h:68
Pointer< TransactionId > transactionId
Definition: Message.h:64
int groupSequence
Definition: Message.h:69
std::vector< decaf::lang::Pointer< BrokerId > > cluster
Definition: Message.h:88
bool isReadOnlyProperties() const
Returns if the Message Properties Are Read Only.
Definition: Message.h:247
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition: Pointer.h:53
std::vector< unsigned char > marshalledProperties
Definition: Message.h:78
Concrete connection used for all connectors to the ActiveMQ broker.
Definition: ActiveMQConnection.h:61
virtual void setAckHandler(const Pointer< core::ActiveMQAckHandler > &handler)
Sets the Acknowledgment Handler that this Message will use when the Acknowledge method is called...
Definition: Message.h:181
util::PrimitiveMap & getMessageProperties()
Gets a reference to the Message's Properties object, allows the derived classes to get and set their ...
Definition: Message.h:236
bool droppable
Definition: Message.h:87
void setReadOnlyProperties(bool value)
Set the Read Only State of the Message Properties.
Definition: Message.h:255