public abstract class Message extends BaseCommand implements MarshallAware, MessageReference
| Modifier and Type | Class and Description |
|---|---|
static interface |
Message.MessageDestination |
| 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 |
static java.lang.String |
ORIGINAL_EXPIRATION |
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() |
void |
compress() |
abstract Message |
copy() |
protected void |
copy(Message copy) |
int |
decrementReferenceCount() |
protected void |
doCompress() |
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() |
Message.MessageDestination |
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(Message.MessageDestination 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) |
abstract void |
storeContent() |
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, setToclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDataStructureTypepublic static final java.lang.String ORIGINAL_EXPIRATION
public static final int DEFAULT_MINIMUM_MESSAGE_SIZE
protected MessageId messageId
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 abstract Message copy()
public abstract void clearBody()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic abstract void storeContent()
public void clearMarshalledState()
throws javax.jms.JMSException
javax.jms.JMSExceptionprotected void copy(Message copy)
public java.lang.Object getProperty(java.lang.String name)
throws java.io.IOException
java.io.IOExceptionpublic java.util.Map<java.lang.String,java.lang.Object> getProperties()
throws java.io.IOException
java.io.IOExceptionpublic void clearProperties()
public void setProperty(java.lang.String name,
java.lang.Object value)
throws java.io.IOException
java.io.IOExceptionpublic void removeProperty(java.lang.String name)
throws java.io.IOException
java.io.IOExceptionprotected void lazyCreateProperties()
throws java.io.IOException
java.io.IOExceptionpublic void beforeMarshall(WireFormat wireFormat) throws java.io.IOException
beforeMarshall in interface MarshallAwarejava.io.IOExceptionpublic void afterMarshall(WireFormat wireFormat) throws java.io.IOException
afterMarshall in interface MarshallAwarejava.io.IOExceptionpublic void beforeUnmarshall(WireFormat wireFormat) throws java.io.IOException
beforeUnmarshall in interface MarshallAwarejava.io.IOExceptionpublic void afterUnmarshall(WireFormat wireFormat) throws java.io.IOException
afterUnmarshall in interface MarshallAwarejava.io.IOExceptionpublic 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 MessageReferencepublic void setMessageId(MessageId messageId)
public TransactionId getOriginalTransactionId()
public void setOriginalTransactionId(TransactionId transactionId)
public java.lang.String getGroupID()
getGroupID in interface MessageReferencepublic void setGroupID(java.lang.String groupID)
public int getGroupSequence()
getGroupSequence in interface MessageReferencepublic void setGroupSequence(int groupSequence)
public java.lang.String getCorrelationId()
public void setCorrelationId(java.lang.String correlationId)
public boolean isPersistent()
isPersistent in interface MessageReferencepublic void setPersistent(boolean deliveryMode)
public long getExpiration()
getExpiration in interface MessageReferencepublic 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 MessageReferencepublic void setTargetConsumerId(ConsumerId targetConsumerId)
public boolean isExpired()
MessageReferenceisExpired in interface MessageReferencepublic boolean isAdvisory()
isAdvisory in interface MessageReferencepublic boolean isCompressed()
public void setCompressed(boolean compressed)
public boolean isRedelivered()
public void setRedelivered(boolean redelivered)
public void incrementRedeliveryCounter()
incrementRedeliveryCounter in interface MessageReferencepublic int getRedeliveryCounter()
getRedeliveryCounter in interface MessageReferencepublic 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 MessageReferencepublic Message getMessageHardRef()
getMessageHardRef in interface MessageReferencepublic Message getMessage()
getMessage in interface MessageReferencepublic void setRegionDestination(Message.MessageDestination destination)
public Message.MessageDestination getRegionDestination()
getRegionDestination in interface MessageReferencepublic MemoryUsage getMemoryUsage()
public void setMemoryUsage(MemoryUsage usage)
public boolean isMarshallAware()
isMarshallAware in interface DataStructureisMarshallAware in class BaseCommandpublic int incrementReferenceCount()
incrementReferenceCount in interface MessageReferencepublic int decrementReferenceCount()
decrementReferenceCount in interface MessageReferencepublic int getSize()
getSize in interface MessageReferenceprotected 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 CommandisMessage in class BaseCommandpublic long getBrokerInTime()
public void setBrokerInTime(long brokerInTime)
public long getBrokerOutTime()
public void setBrokerOutTime(long brokerOutTime)
public boolean isDropped()
MessageReferenceisDropped in interface MessageReferencepublic void compress()
throws java.io.IOException
java.io.IOExceptionprotected void doCompress()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String toString()
toString in class BaseCommandpublic java.lang.String toString(java.util.Map<java.lang.String,java.lang.Object> overrideFields)
toString in class BaseCommandCopyright © 2005-2013 Red Hat, Inc.. All Rights Reserved.