public abstract class Message extends BaseCommand implements MarshallAware, MessageReference
Modifier and Type | Class and Description |
---|---|
static interface |
Message.MessageDestination |
commandId, responseRequired
Constructor and Description |
---|
Message() |
copy, getCommandId, getFrom, getTo, isBrokerInfo, isConnectionControl, isConsumerControl, 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 String ORIGINAL_EXPIRATION
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 String correlationId
protected ActiveMQDestination replyTo
protected boolean persistent
protected byte priority
protected int groupSequence
protected ConsumerId targetConsumerId
protected boolean compressed
protected ByteSequence content
protected ByteSequence marshalledProperties
protected DataStructure dataStructure
protected int redeliveryCounter
protected int size
protected Map<String,Object> properties
protected boolean readOnlyProperties
protected boolean readOnlyBody
protected transient boolean recievedByDFBridge
protected boolean droppable
protected boolean jmsXGroupFirstForConsumer
public Message()
public abstract void clearBody() throws javax.jms.JMSException
javax.jms.JMSException
public abstract void storeContent()
public abstract void storeContentAndClear()
public void clearMarshalledState() throws javax.jms.JMSException
javax.jms.JMSException
public void clearUnMarshalledState() throws javax.jms.JMSException
javax.jms.JMSException
public boolean isMarshalled()
protected boolean isPropertiesMarshalled()
protected boolean isContentMarshalled()
public Object getProperty(String name) throws IOException
IOException
public Map<String,Object> getProperties() throws IOException
IOException
public void clearProperties()
public void setProperty(String name, Object value) throws IOException
IOException
public void removeProperty(String name) throws IOException
IOException
protected void lazyCreateProperties() throws IOException
IOException
public void beforeMarshall(WireFormat wireFormat) throws IOException
beforeMarshall
in interface MarshallAware
IOException
public void afterMarshall(WireFormat wireFormat) throws IOException
afterMarshall
in interface MarshallAware
IOException
public void beforeUnmarshall(WireFormat wireFormat) throws IOException
beforeUnmarshall
in interface MarshallAware
IOException
public void afterUnmarshall(WireFormat wireFormat) throws IOException
afterUnmarshall
in interface MarshallAware
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 String getGroupID()
getGroupID
in interface MessageReference
public void setGroupID(String groupID)
public int getGroupSequence()
getGroupSequence
in interface MessageReference
public void setGroupSequence(int groupSequence)
public String getCorrelationId()
public void setCorrelationId(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 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 String getUserID()
public int getReferenceCount()
getReferenceCount
in interface MessageReference
public Message getMessageHardRef()
getMessageHardRef
in interface MessageReference
public Message getMessage()
getMessage
in interface MessageReference
public void setRegionDestination(Message.MessageDestination destination)
public Message.MessageDestination getRegionDestination()
getRegionDestination
in interface MessageReference
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 boolean isJMSXGroupFirstForConsumer()
public void setJMSXGroupFirstForConsumer(boolean val)
public void compress() throws IOException
IOException
protected void doCompress() throws IOException
IOException
public String toString()
toString
in class BaseCommand
public String toString(Map<String,Object> overrideFields)
toString
in class BaseCommand
public boolean canProcessAsExpired()
canProcessAsExpired
in interface MessageReference
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.