org.apache.activemq.command
public abstract class Message extends BaseCommand implements MarshallAware, MessageReference
Modifier and Type | Field and Description |
---|---|
protected long |
arrival |
protected long |
brokerInTime |
protected long |
brokerOutTime |
protected boolean |
compressed |
protected ByteSequence |
content |
protected java.lang.String |
correlationId |
protected DataStructure |
dataStructure |
static int |
DEFAULT_MINIMUM_MESSAGE_SIZE
The default minimum amount of memory a message is assumed to use
|
protected ActiveMQDestination |
destination |
protected boolean |
droppable |
protected long |
expiration |
protected java.lang.String |
groupID |
protected int |
groupSequence |
protected ByteSequence |
marshalledProperties |
protected MessageId |
messageId |
protected ActiveMQDestination |
originalDestination |
protected TransactionId |
originalTransactionId |
protected boolean |
persistent |
protected byte |
priority |
protected ProducerId |
producerId |
protected java.util.Map<java.lang.String,java.lang.Object> |
properties |
protected boolean |
readOnlyBody |
protected boolean |
readOnlyProperties |
protected boolean |
recievedByDFBridge |
protected int |
redeliveryCounter |
protected ActiveMQDestination |
replyTo |
protected int |
size |
protected ConsumerId |
targetConsumerId |
protected long |
timestamp |
protected TransactionId |
transactionId |
protected java.lang.String |
type |
protected java.lang.String |
userID |
commandId, responseRequired
Constructor and Description |
---|
Message() |
Modifier and Type | Method and Description |
---|---|
void |
afterMarshall(WireFormat wireFormat) |
void |
afterUnmarshall(WireFormat wireFormat) |
void |
beforeMarshall(WireFormat wireFormat) |
void |
beforeUnmarshall(WireFormat wireFormat) |
abstract void |
clearBody() |
void |
clearMarshalledState() |
void |
clearProperties() |
abstract Message |
copy() |
protected void |
copy(Message copy) |
int |
decrementReferenceCount() |
long |
getArrival()
Used to schedule the arrival time of a message to a broker.
|
long |
getBrokerInTime() |
long |
getBrokerOutTime() |
BrokerId[] |
getBrokerPath()
The route of brokers the command has moved through.
|
BrokerId[] |
getCluster()
If a message is stored in multiple nodes on a cluster, all the cluster
members will be listed here.
|
ActiveMQConnection |
getConnection() |
ByteSequence |
getContent() |
java.lang.String |
getCorrelationId() |
DataStructure |
getDataStructure() |
ActiveMQDestination |
getDestination() |
long |
getExpiration() |
java.lang.String |
getGroupID() |
int |
getGroupSequence() |
ByteSequence |
getMarshalledProperties() |
MemoryUsage |
getMemoryUsage() |
Message |
getMessage() |
Message |
getMessageHardRef() |
MessageId |
getMessageId() |
protected int |
getMinimumMessageSize() |
ActiveMQDestination |
getOriginalDestination() |
TransactionId |
getOriginalTransactionId() |
byte |
getPriority() |
ProducerId |
getProducerId() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
java.lang.Object |
getProperty(java.lang.String name) |
int |
getRedeliveryCounter() |
int |
getReferenceCount() |
Destination |
getRegionDestination() |
ActiveMQDestination |
getReplyTo() |
int |
getSize() |
ConsumerId |
getTargetConsumerId()
Can be used to route the message to a specific consumer.
|
long |
getTimestamp() |
TransactionId |
getTransactionId() |
java.lang.String |
getType() |
java.lang.String |
getUserID()
Only set by the broker and defines the userID of the producer connection
who sent this message.
|
void |
incrementRedeliveryCounter() |
int |
incrementReferenceCount() |
boolean |
isAdvisory() |
boolean |
isCompressed() |
boolean |
isDroppable() |
boolean |
isDropped()
Returns true if this message is dropped.
|
boolean |
isExpired()
Returns true if this message is expired
|
boolean |
isInTransaction() |
boolean |
isMarshallAware() |
boolean |
isMessage() |
boolean |
isPersistent() |
boolean |
isReadOnlyBody() |
boolean |
isReadOnlyProperties() |
boolean |
isRecievedByDFBridge() |
boolean |
isRedelivered() |
protected void |
lazyCreateProperties() |
void |
onMessageRolledBack() |
void |
removeProperty(java.lang.String name) |
void |
setArrival(long arrival) |
void |
setBrokerInTime(long brokerInTime) |
void |
setBrokerOutTime(long brokerOutTime) |
void |
setBrokerPath(BrokerId[] brokerPath) |
void |
setCluster(BrokerId[] cluster) |
void |
setCompressed(boolean compressed) |
void |
setConnection(ActiveMQConnection connection) |
void |
setContent(ByteSequence content) |
void |
setCorrelationId(java.lang.String correlationId) |
void |
setDataStructure(DataStructure data) |
void |
setDestination(ActiveMQDestination destination) |
void |
setDroppable(boolean droppable) |
void |
setExpiration(long expiration) |
void |
setGroupID(java.lang.String groupID) |
void |
setGroupSequence(int groupSequence) |
void |
setMarshalledProperties(ByteSequence marshalledProperties) |
void |
setMemoryUsage(MemoryUsage usage) |
void |
setMessageId(MessageId messageId) |
void |
setOriginalDestination(ActiveMQDestination destination) |
void |
setOriginalTransactionId(TransactionId transactionId) |
void |
setPersistent(boolean deliveryMode) |
void |
setPriority(byte priority) |
void |
setProducerId(ProducerId producerId) |
void |
setProperty(java.lang.String name,
java.lang.Object value) |
void |
setReadOnlyBody(boolean readOnlyBody) |
void |
setReadOnlyProperties(boolean readOnlyProperties) |
void |
setRecievedByDFBridge(boolean recievedByDFBridge) |
void |
setRedelivered(boolean redelivered) |
void |
setRedeliveryCounter(int deliveryCounter) |
void |
setRegionDestination(Destination destination) |
void |
setReplyTo(ActiveMQDestination replyTo) |
void |
setTargetConsumerId(ConsumerId targetConsumerId) |
void |
setTimestamp(long timestamp) |
void |
setTransactionId(TransactionId transactionId) |
void |
setType(java.lang.String type) |
void |
setUserID(java.lang.String jmsxUserID) |
java.lang.String |
toString() |
java.lang.String |
toString(java.util.Map<java.lang.String,java.lang.Object> overrideFields) |
copy, getCommandId, getFrom, getTo, isBrokerInfo, isConnectionControl, isMessageAck, isMessageDispatch, isMessageDispatchNotification, isResponse, isResponseRequired, isShutdownInfo, isWireFormatInfo, setCommandId, setFrom, setResponseRequired, setTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDataStructureType
public static final int DEFAULT_MINIMUM_MESSAGE_SIZE
protected ActiveMQDestination originalDestination
protected TransactionId originalTransactionId
protected ProducerId producerId
protected ActiveMQDestination destination
protected TransactionId transactionId
protected long expiration
protected long timestamp
protected long arrival
protected long brokerInTime
protected long brokerOutTime
protected java.lang.String correlationId
protected ActiveMQDestination replyTo
protected boolean persistent
protected java.lang.String type
protected byte priority
protected java.lang.String groupID
protected int groupSequence
protected ConsumerId targetConsumerId
protected boolean compressed
protected java.lang.String userID
protected ByteSequence content
protected ByteSequence marshalledProperties
protected DataStructure dataStructure
protected int redeliveryCounter
protected int size
protected java.util.Map<java.lang.String,java.lang.Object> properties
protected boolean readOnlyProperties
protected boolean readOnlyBody
protected transient boolean recievedByDFBridge
protected boolean droppable
public Message()
public abstract void clearBody() throws javax.jms.JMSException
javax.jms.JMSException
public void clearMarshalledState() throws javax.jms.JMSException
javax.jms.JMSException
public java.lang.Object getProperty(java.lang.String name) throws java.io.IOException
java.io.IOException
public java.util.Map<java.lang.String,java.lang.Object> getProperties() throws java.io.IOException
java.io.IOException
public void clearProperties()
public void setProperty(java.lang.String name, java.lang.Object value) throws java.io.IOException
java.io.IOException
public void removeProperty(java.lang.String name) throws java.io.IOException
java.io.IOException
protected void lazyCreateProperties() throws java.io.IOException
java.io.IOException
public void beforeMarshall(WireFormat wireFormat) throws java.io.IOException
beforeMarshall
in interface MarshallAware
java.io.IOException
public void afterMarshall(WireFormat wireFormat) throws java.io.IOException
afterMarshall
in interface MarshallAware
java.io.IOException
public void beforeUnmarshall(WireFormat wireFormat) throws java.io.IOException
beforeUnmarshall
in interface MarshallAware
java.io.IOException
public void afterUnmarshall(WireFormat wireFormat) throws java.io.IOException
afterUnmarshall
in interface MarshallAware
java.io.IOException
public ProducerId getProducerId()
public void setProducerId(ProducerId producerId)
public ActiveMQDestination getDestination()
public void setDestination(ActiveMQDestination destination)
public TransactionId getTransactionId()
public void setTransactionId(TransactionId transactionId)
public boolean isInTransaction()
public ActiveMQDestination getOriginalDestination()
public void setOriginalDestination(ActiveMQDestination destination)
public MessageId getMessageId()
getMessageId
in interface MessageReference
public void setMessageId(MessageId messageId)
public TransactionId getOriginalTransactionId()
public void setOriginalTransactionId(TransactionId transactionId)
public java.lang.String getGroupID()
getGroupID
in interface MessageReference
public void setGroupID(java.lang.String groupID)
public int getGroupSequence()
getGroupSequence
in interface MessageReference
public void setGroupSequence(int groupSequence)
public java.lang.String getCorrelationId()
public void setCorrelationId(java.lang.String correlationId)
public boolean isPersistent()
isPersistent
in interface MessageReference
public void setPersistent(boolean deliveryMode)
public long getExpiration()
getExpiration
in interface MessageReference
public void setExpiration(long expiration)
public byte getPriority()
public void setPriority(byte priority)
public ActiveMQDestination getReplyTo()
public void setReplyTo(ActiveMQDestination replyTo)
public long getTimestamp()
public void setTimestamp(long timestamp)
public java.lang.String getType()
public void setType(java.lang.String type)
public ByteSequence getContent()
public void setContent(ByteSequence content)
public ByteSequence getMarshalledProperties()
public void setMarshalledProperties(ByteSequence marshalledProperties)
public DataStructure getDataStructure()
public void setDataStructure(DataStructure data)
public ConsumerId getTargetConsumerId()
getTargetConsumerId
in interface MessageReference
public void setTargetConsumerId(ConsumerId targetConsumerId)
public boolean isExpired()
MessageReference
isExpired
in interface MessageReference
public boolean isAdvisory()
isAdvisory
in interface MessageReference
public boolean isCompressed()
public void setCompressed(boolean compressed)
public boolean isRedelivered()
public void setRedelivered(boolean redelivered)
public void incrementRedeliveryCounter()
incrementRedeliveryCounter
in interface MessageReference
public int getRedeliveryCounter()
getRedeliveryCounter
in interface MessageReference
public void setRedeliveryCounter(int deliveryCounter)
public BrokerId[] getBrokerPath()
public void setBrokerPath(BrokerId[] brokerPath)
public boolean isReadOnlyProperties()
public void setReadOnlyProperties(boolean readOnlyProperties)
public boolean isReadOnlyBody()
public void setReadOnlyBody(boolean readOnlyBody)
public ActiveMQConnection getConnection()
public void setConnection(ActiveMQConnection connection)
public long getArrival()
public void setArrival(long arrival)
public java.lang.String getUserID()
public void setUserID(java.lang.String jmsxUserID)
public int getReferenceCount()
getReferenceCount
in interface MessageReference
public Message getMessageHardRef()
getMessageHardRef
in interface MessageReference
public Message getMessage()
getMessage
in interface MessageReference
public Destination getRegionDestination()
getRegionDestination
in interface MessageReference
public void setRegionDestination(Destination destination)
public MemoryUsage getMemoryUsage()
public void setMemoryUsage(MemoryUsage usage)
public boolean isMarshallAware()
isMarshallAware
in interface DataStructure
isMarshallAware
in class BaseCommand
public int incrementReferenceCount()
incrementReferenceCount
in interface MessageReference
public int decrementReferenceCount()
decrementReferenceCount
in interface MessageReference
public int getSize()
getSize
in interface MessageReference
protected int getMinimumMessageSize()
public boolean isRecievedByDFBridge()
public void setRecievedByDFBridge(boolean recievedByDFBridge)
recievedByDFBridge
- The recievedByDFBridge to set.public void onMessageRolledBack()
public boolean isDroppable()
public void setDroppable(boolean droppable)
public BrokerId[] getCluster()
public void setCluster(BrokerId[] cluster)
public boolean isMessage()
isMessage
in interface Command
isMessage
in class BaseCommand
public long getBrokerInTime()
public void setBrokerInTime(long brokerInTime)
public long getBrokerOutTime()
public void setBrokerOutTime(long brokerOutTime)
public boolean isDropped()
MessageReference
isDropped
in interface MessageReference
public java.lang.String toString()
toString
in class BaseCommand
public java.lang.String toString(java.util.Map<java.lang.String,java.lang.Object> overrideFields)
toString
in class BaseCommand
Copyright © 2005-2014. All Rights Reserved.