18#ifndef _ACTIVEMQ_COMMANDS_MESSAGE_H_
19#define _ACTIVEMQ_COMMANDS_MESSAGE_H_
23#pragma warning( disable : 4290 )
48 using decaf::lang::Pointer;
83 std::vector< decaf::lang::Pointer<BrokerId> >
brokerPath;
88 std::vector< decaf::lang::Pointer<BrokerId> >
cluster;
108 bool readOnlyProperties;
121 Message(
const Message&);
122 Message& operator= (
const Message&);
182 this->ackHandler = handler;
191 return this->ackHandler;
209 return this->connection;
237 return this->properties;
240 return this->properties;
248 return this->readOnlyProperties;
256 this->readOnlyProperties = value;
264 return this->readOnlyBody;
272 this->readOnlyBody = value;
330 virtual const std::vector<unsigned char>&
getContent()
const;
352 virtual const std::vector< decaf::lang::Pointer<BrokerId> >&
getBrokerPath()
const;
369 virtual const std::vector< decaf::lang::Pointer<BrokerId> >&
getCluster()
const;
370 virtual std::vector< decaf::lang::Pointer<BrokerId> >&
getCluster();
#define AMQCPP_API
Definition Config.h:30
BaseCommand()
Definition BaseCommand.h:35
Definition DataStructure.h:27
virtual void setArrival(long long arrival)
virtual Pointer< DataStructure > & getDataStructure()
virtual std::string & getCorrelationId()
std::vector< unsigned char > marshalledProperties
Definition Message.h:78
virtual const Pointer< ActiveMQDestination > & getReplyTo() const
virtual void setUserID(const std::string &userID)
virtual void setDestination(const Pointer< ActiveMQDestination > &destination)
virtual std::vector< decaf::lang::Pointer< BrokerId > > & getCluster()
static const unsigned char ID_MESSAGE
Definition Message.h:95
virtual const std::string & getCorrelationId() const
int groupSequence
Definition Message.h:69
virtual void setBrokerInTime(long long brokerInTime)
virtual void setBrokerOutTime(long long brokerOutTime)
virtual unsigned char getDataStructureType() const
Get the DataStructure Type as defined in CommandTypes.h.
unsigned char priority
Definition Message.h:73
virtual bool isMarshalAware() const
Indicates that this command is aware of Marshaling, and needs to have its Marshaling methods invoked.
Definition Message.h:172
bool compressed
Definition Message.h:81
virtual Pointer< ActiveMQDestination > & getDestination()
virtual bool isExpired() const
Returns if this message has expired, meaning that its Expiration time has elapsed.
virtual void setRecievedByDFBridge(bool recievedByDFBridge)
virtual long long getBrokerOutTime() const
virtual const Pointer< DataStructure > & getDataStructure() const
virtual Pointer< TransactionId > & getOriginalTransactionId()
virtual Pointer< Command > visit(activemq::state::CommandVisitor *visitor)
Allows a Visitor to visit this command and return a response to the command based on the command type...
virtual const std::string & getType() const
virtual long long getExpiration() const
virtual void setTimestamp(long long timestamp)
core::ActiveMQConnection * getConnection() const
Gets the ActiveMQConnection instance that this Command was created from when the session create metho...
Definition Message.h:208
virtual Pointer< TransactionId > & getTransactionId()
long long brokerOutTime
Definition Message.h:90
virtual int getRedeliveryCounter() const
virtual void setType(const std::string &type)
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
bool isReadOnlyBody() const
Returns if the Message Body is Read Only.
Definition Message.h:263
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
virtual const std::vector< decaf::lang::Pointer< BrokerId > > & getCluster() const
virtual std::string & getGroupID()
virtual Pointer< ActiveMQDestination > & getReplyTo()
virtual const Pointer< MessageId > & getMessageId() const
virtual Pointer< ProducerId > & getProducerId()
int redeliveryCounter
Definition Message.h:82
void setReadOnlyBody(bool value)
Set the Read Only State of the Message Content.
Definition Message.h:271
bool droppable
Definition Message.h:87
virtual const Pointer< TransactionId > & getOriginalTransactionId() const
Pointer< Message > copy() const
Create a Pointer based copy of this message.
Definition Message.h:148
virtual int getGroupSequence() const
bool recievedByDFBridge
Definition Message.h:86
virtual const Pointer< ActiveMQDestination > & getOriginalDestination() const
virtual void setDroppable(bool droppable)
std::string groupID
Definition Message.h:68
virtual std::vector< decaf::lang::Pointer< BrokerId > > & getBrokerPath()
bool persistent
Definition Message.h:71
virtual bool isRecievedByDFBridge() const
virtual void setPriority(unsigned char priority)
virtual void setOriginalDestination(const Pointer< ActiveMQDestination > &originalDestination)
virtual void copyDataStructure(const DataStructure *src)
Copy the contents of the passed object into this objects members, overwriting any existing data.
core::ActiveMQConnection * connection
Definition Message.h:115
virtual bool isMessage() const
Definition Message.h:385
virtual void setProducerId(const Pointer< ProducerId > &producerId)
virtual void setOriginalTransactionId(const Pointer< TransactionId > &originalTransactionId)
virtual std::string & getUserID()
const util::PrimitiveMap & getMessageProperties() const
Definition Message.h:239
virtual void setJMSXGroupFirstForConsumer(bool jMSXGroupFirstForConsumer)
virtual void setContent(const std::vector< unsigned char > &content)
virtual void setCorrelationId(const std::string &correlationId)
virtual void setTargetConsumerId(const Pointer< ConsumerId > &targetConsumerId)
virtual long long getTimestamp() const
long long brokerInTime
Definition Message.h:89
virtual void setBrokerPath(const std::vector< decaf::lang::Pointer< BrokerId > > &brokerPath)
virtual void beforeMarshal(wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
Handles the marshaling of the objects properties into the internal byte array before the object is ma...
virtual bool isCompressed() const
virtual void setExpiration(long long expiration)
long long timestamp
Definition Message.h:75
virtual unsigned int getSize() const
Returns the Size of this message in Bytes.
virtual bool isDroppable() const
Pointer< ActiveMQDestination > destination
Definition Message.h:63
virtual const Pointer< ActiveMQDestination > & getDestination() const
static const unsigned int DEFAULT_MESSAGE_SIZE
Definition Message.h:117
long long arrival
Definition Message.h:84
virtual Pointer< ConsumerId > & getTargetConsumerId()
std::string userID
Definition Message.h:85
virtual void setDataStructure(const Pointer< DataStructure > &dataStructure)
std::vector< decaf::lang::Pointer< BrokerId > > cluster
Definition Message.h:88
virtual Pointer< MessageId > & getMessageId()
long long expiration
Definition Message.h:72
virtual bool isJMSXGroupFirstForConsumer() const
virtual long long getBrokerInTime() const
virtual const Pointer< TransactionId > & getTransactionId() const
virtual void setCompressed(bool compressed)
virtual void setTransactionId(const Pointer< TransactionId > &transactionId)
virtual long long getArrival() const
virtual std::string toString() const
Returns a string containing the information for this DataStructure such as its type and value of its ...
virtual const std::vector< decaf::lang::Pointer< BrokerId > > & getBrokerPath() const
virtual void setReplyTo(const Pointer< ActiveMQDestination > &replyTo)
std::string type
Definition Message.h:76
virtual const std::vector< unsigned char > & getMarshalledProperties() const
Pointer< ActiveMQDestination > replyTo
Definition Message.h:74
void setConnection(core::ActiveMQConnection *connection)
Sets the ActiveMQConnection instance that this Command was created from when the session create metho...
Definition Message.h:199
Pointer< MessageId > messageId
Definition Message.h:66
virtual void setCluster(const std::vector< decaf::lang::Pointer< BrokerId > > &cluster)
virtual const std::vector< unsigned char > & getContent() const
virtual const std::string & getGroupID() const
Pointer< ActiveMQDestination > originalDestination
Definition Message.h:65
virtual const Pointer< ProducerId > & getProducerId() const
virtual bool isPersistent() const
std::vector< decaf::lang::Pointer< BrokerId > > brokerPath
Definition Message.h:83
virtual bool equals(const DataStructure *value) const
Compares the DataStructure passed in to this one, and returns if they are equivalent.
std::vector< unsigned char > content
Definition Message.h:77
virtual void afterUnmarshal(wireformat::WireFormat *wireFormat AMQCPP_UNUSED)
Called after unmarshaling is started to cleanup the object being unmarshaled.
virtual unsigned char getPriority() const
virtual Pointer< ActiveMQDestination > & getOriginalDestination()
Pointer< TransactionId > originalTransactionId
Definition Message.h:67
virtual void setMarshalledProperties(const std::vector< unsigned char > &marshalledProperties)
virtual void setMessageId(const Pointer< MessageId > &messageId)
std::string correlationId
Definition Message.h:70
virtual std::string & getType()
virtual std::vector< unsigned char > & getMarshalledProperties()
virtual void setRedeliveryCounter(int redeliveryCounter)
Pointer< DataStructure > dataStructure
Definition Message.h:79
virtual const std::string & getUserID() const
bool jMSXGroupFirstForConsumer
Definition Message.h:91
virtual const Pointer< ConsumerId > & getTargetConsumerId() const
Pointer< TransactionId > transactionId
Definition Message.h:64
virtual void setPersistent(bool persistent)
Pointer< ConsumerId > targetConsumerId
Definition Message.h:80
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
virtual void setGroupID(const std::string &groupID)
Pointer< ProducerId > producerId
Definition Message.h:62
virtual void onSend()
Allows derived Message classes to perform tasks before a message is sent.
Definition Message.h:228
virtual std::vector< unsigned char > & getContent()
void setReadOnlyProperties(bool value)
Set the Read Only State of the Message Properties.
Definition Message.h:255
virtual Message * cloneDataStructure() const
Clone this obbject and return a new instance that the caller now owns, this will be an exact copy of ...
bool isReadOnlyProperties() const
Returns if the Message Properties Are Read Only.
Definition Message.h:247
virtual void setGroupSequence(int groupSequence)
Interface class that is used to give CMS Messages an interface to Ack themselves with.
Definition ActiveMQAckHandler.h:34
Concrete connection used for all connectors to the ActiveMQ broker.
Definition ActiveMQConnection.h:62
Interface for an Object that can visit the various Command Objects that are sent from and to this cli...
Definition CommandVisitor.h:69
Map of named primitives.
Definition PrimitiveMap.h:36
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
Definition ActiveMQBlobMessage.h:28
Definition ActiveMQTempDestination.h:29
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition CachedConsumer.h:24