public class ActiveMQMessage extends Message implements Message, ScheduledMessage
Message.MessageDestination
Modifier and Type | Field and Description |
---|---|
protected Callback |
acknowledgeCallback |
static String |
BROKER_PATH_PROPERTY |
static byte |
DATA_STRUCTURE_TYPE |
static String |
DLQ_DELIVERY_FAILURE_CAUSE_PROPERTY |
arrival, brokerInTime, brokerOutTime, compressed, content, correlationId, dataStructure, DEFAULT_MINIMUM_MESSAGE_SIZE, destination, droppable, expiration, groupID, groupSequence, jmsXGroupFirstForConsumer, marshalledProperties, messageId, ORIGINAL_EXPIRATION, originalDestination, originalTransactionId, persistent, priority, producerId, properties, readOnlyBody, readOnlyProperties, recievedByDFBridge, redeliveryCounter, replyTo, size, targetConsumerId, timestamp, transactionId, type, userID
commandId, responseRequired
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
AMQ_SCHEDULED_CRON, AMQ_SCHEDULED_DELAY, AMQ_SCHEDULED_ID, AMQ_SCHEDULED_PERIOD, AMQ_SCHEDULED_REPEAT, AMQ_SCHEDULER_ACTION, AMQ_SCHEDULER_ACTION_BROWSE, AMQ_SCHEDULER_ACTION_END_TIME, AMQ_SCHEDULER_ACTION_REMOVE, AMQ_SCHEDULER_ACTION_REMOVEALL, AMQ_SCHEDULER_ACTION_START_TIME, AMQ_SCHEDULER_MANAGEMENT_DESTINATION
Constructor and Description |
---|
ActiveMQMessage() |
Modifier and Type | Method and Description |
---|---|
void |
acknowledge() |
protected void |
checkReadOnlyBody() |
protected void |
checkValidObject(Object value) |
protected void |
checkValidScheduled(String name,
Object value) |
void |
clearBody() |
void |
clearProperties() |
protected Object |
convertScheduled(String name,
Object value) |
Message |
copy() |
protected void |
copy(ActiveMQMessage copy) |
protected static String |
decodeString(byte[] data) |
protected static byte[] |
encodeString(String data) |
boolean |
equals(Object o) |
Callback |
getAcknowledgeCallback() |
Enumeration |
getAllPropertyNames()
return all property names, including standard JMS properties and JMSX properties
|
boolean |
getBooleanProperty(String name) |
byte |
getByteProperty(String name) |
byte |
getDataStructureType() |
double |
getDoubleProperty(String name) |
float |
getFloatProperty(String name) |
int |
getIntProperty(String name) |
String |
getJMSCorrelationID() |
byte[] |
getJMSCorrelationIDAsBytes() |
int |
getJMSDeliveryMode() |
Destination |
getJMSDestination() |
long |
getJMSExpiration() |
String |
getJMSMessageID() |
int |
getJMSPriority() |
boolean |
getJMSRedelivered() |
Destination |
getJMSReplyTo() |
long |
getJMSTimestamp() |
String |
getJMSType() |
String |
getJMSXMimeType()
Returns the MIME type of this mesage.
|
long |
getLongProperty(String name) |
Object |
getObjectProperty(String name) |
Enumeration |
getPropertyNames() |
short |
getShortProperty(String name) |
String |
getStringProperty(String name) |
int |
hashCode() |
void |
onSend()
Send operation event listener.
|
boolean |
propertyExists(String name) |
void |
setAcknowledgeCallback(Callback acknowledgeCallback) |
void |
setBooleanProperty(String name,
boolean value) |
void |
setBooleanProperty(String name,
boolean value,
boolean checkReadOnly) |
void |
setByteProperty(String name,
byte value) |
void |
setDoubleProperty(String name,
double value) |
void |
setFloatProperty(String name,
float value) |
void |
setIntProperty(String name,
int value) |
void |
setJMSCorrelationID(String correlationId) |
void |
setJMSCorrelationIDAsBytes(byte[] correlationId) |
void |
setJMSDeliveryMode(int mode) |
void |
setJMSDestination(Destination destination) |
void |
setJMSExpiration(long expiration) |
void |
setJMSMessageID(ProducerId producerId,
long producerSequenceId)
This will create an object of MessageId.
|
void |
setJMSMessageID(String value)
Seems to be invalid because the parameter doesn't initialize MessageId
instance variables ProducerId and ProducerSequenceId
|
void |
setJMSPriority(int priority) |
void |
setJMSRedelivered(boolean redelivered) |
void |
setJMSReplyTo(Destination destination) |
void |
setJMSTimestamp(long timestamp) |
void |
setJMSType(String type) |
void |
setLongProperty(String name,
long value) |
void |
setObjectProperty(String name,
Object value) |
void |
setObjectProperty(String name,
Object value,
boolean checkReadOnly) |
void |
setProperties(Map<String,?> properties) |
void |
setShortProperty(String name,
short value) |
void |
setStringProperty(String name,
String value) |
void |
storeContent() |
void |
storeContentAndClear() |
Response |
visit(CommandVisitor visitor) |
afterMarshall, afterUnmarshall, beforeMarshall, beforeUnmarshall, clearMarshalledState, compress, copy, decrementReferenceCount, doCompress, getArrival, getBrokerInTime, getBrokerOutTime, getBrokerPath, getCluster, getConnection, getContent, getCorrelationId, getDataStructure, getDestination, getExpiration, getGroupID, getGroupSequence, getMarshalledProperties, getMemoryUsage, getMessage, getMessageHardRef, getMessageId, getMinimumMessageSize, getOriginalDestination, getOriginalTransactionId, getPriority, getProducerId, getProperties, getProperty, getRedeliveryCounter, getReferenceCount, getRegionDestination, getReplyTo, getSize, getTargetConsumerId, getTimestamp, getTransactionId, getType, getUserID, incrementRedeliveryCounter, incrementReferenceCount, isAdvisory, isCompressed, isDroppable, isDropped, isExpired, isInTransaction, isJMSXGroupFirstForConsumer, isMarshallAware, isMessage, isPersistent, isReadOnlyBody, isReadOnlyProperties, isRecievedByDFBridge, isRedelivered, lazyCreateProperties, onMessageRolledBack, removeProperty, setArrival, setBrokerInTime, setBrokerOutTime, setBrokerPath, setCluster, setCompressed, setConnection, setContent, setCorrelationId, setDataStructure, setDestination, setDroppable, setExpiration, setGroupID, setGroupSequence, setJMSXGroupFirstForConsumer, setMarshalledProperties, setMemoryUsage, setMessageId, setOriginalDestination, setOriginalTransactionId, setPersistent, setPriority, setProducerId, setProperty, setReadOnlyBody, setReadOnlyProperties, setRecievedByDFBridge, setRedelivered, setRedeliveryCounter, setRegionDestination, setReplyTo, setTargetConsumerId, setTimestamp, setTransactionId, setType, setUserID, toString, toString
copy, getCommandId, getFrom, getTo, isBrokerInfo, isConnectionControl, isConsumerControl, isMessageAck, isMessageDispatch, isMessageDispatchNotification, isResponse, isResponseRequired, isShutdownInfo, isWireFormatInfo, setCommandId, setFrom, setResponseRequired, setTo
public static final byte DATA_STRUCTURE_TYPE
public static final String DLQ_DELIVERY_FAILURE_CAUSE_PROPERTY
public static final String BROKER_PATH_PROPERTY
protected transient Callback acknowledgeCallback
public ActiveMQMessage()
public byte getDataStructureType()
getDataStructureType
in interface DataStructure
protected void copy(ActiveMQMessage copy)
public void acknowledge() throws JMSException
acknowledge
in interface Message
JMSException
public void clearBody() throws JMSException
clearBody
in interface Message
clearBody
in class Message
JMSException
public String getJMSMessageID()
getJMSMessageID
in interface Message
public void setJMSMessageID(String value) throws JMSException
setJMSMessageID
in interface Message
value
- JMSException
public void setJMSMessageID(ProducerId producerId, long producerSequenceId) throws JMSException
producerId
- producerSequenceId
- JMSException
public long getJMSTimestamp()
getJMSTimestamp
in interface Message
public void setJMSTimestamp(long timestamp)
setJMSTimestamp
in interface Message
public String getJMSCorrelationID()
getJMSCorrelationID
in interface Message
public void setJMSCorrelationID(String correlationId)
setJMSCorrelationID
in interface Message
public byte[] getJMSCorrelationIDAsBytes() throws JMSException
getJMSCorrelationIDAsBytes
in interface Message
JMSException
public void setJMSCorrelationIDAsBytes(byte[] correlationId) throws JMSException
setJMSCorrelationIDAsBytes
in interface Message
JMSException
public String getJMSXMimeType()
Message
BlobMessage
it allows you to create a selector on the MIME type of the BLOB bodyprotected static String decodeString(byte[] data) throws JMSException
JMSException
protected static byte[] encodeString(String data) throws JMSException
JMSException
public Destination getJMSReplyTo()
getJMSReplyTo
in interface Message
public void setJMSReplyTo(Destination destination) throws JMSException
setJMSReplyTo
in interface Message
JMSException
public Destination getJMSDestination()
getJMSDestination
in interface Message
public void setJMSDestination(Destination destination) throws JMSException
setJMSDestination
in interface Message
JMSException
public int getJMSDeliveryMode()
getJMSDeliveryMode
in interface Message
public void setJMSDeliveryMode(int mode)
setJMSDeliveryMode
in interface Message
public boolean getJMSRedelivered()
getJMSRedelivered
in interface Message
public void setJMSRedelivered(boolean redelivered)
setJMSRedelivered
in interface Message
public String getJMSType()
getJMSType
in interface Message
public void setJMSType(String type)
setJMSType
in interface Message
public long getJMSExpiration()
getJMSExpiration
in interface Message
public void setJMSExpiration(long expiration)
setJMSExpiration
in interface Message
public int getJMSPriority()
getJMSPriority
in interface Message
public void setJMSPriority(int priority)
setJMSPriority
in interface Message
public void clearProperties()
clearProperties
in interface Message
clearProperties
in class Message
public boolean propertyExists(String name) throws JMSException
propertyExists
in interface Message
JMSException
public Enumeration getPropertyNames() throws JMSException
getPropertyNames
in interface Message
JMSException
public Enumeration getAllPropertyNames() throws JMSException
JMSException
public void setObjectProperty(String name, Object value) throws JMSException
setObjectProperty
in interface Message
JMSException
public void setObjectProperty(String name, Object value, boolean checkReadOnly) throws JMSException
JMSException
public void setProperties(Map<String,?> properties) throws JMSException
JMSException
protected void checkValidObject(Object value) throws MessageFormatException
MessageFormatException
protected void checkValidScheduled(String name, Object value) throws MessageFormatException
MessageFormatException
protected Object convertScheduled(String name, Object value) throws MessageFormatException
MessageFormatException
public Object getObjectProperty(String name) throws JMSException
getObjectProperty
in interface Message
JMSException
public boolean getBooleanProperty(String name) throws JMSException
getBooleanProperty
in interface Message
JMSException
public byte getByteProperty(String name) throws JMSException
getByteProperty
in interface Message
JMSException
public short getShortProperty(String name) throws JMSException
getShortProperty
in interface Message
JMSException
public int getIntProperty(String name) throws JMSException
getIntProperty
in interface Message
JMSException
public long getLongProperty(String name) throws JMSException
getLongProperty
in interface Message
JMSException
public float getFloatProperty(String name) throws JMSException
getFloatProperty
in interface Message
JMSException
public double getDoubleProperty(String name) throws JMSException
getDoubleProperty
in interface Message
JMSException
public String getStringProperty(String name) throws JMSException
getStringProperty
in interface Message
JMSException
public void setBooleanProperty(String name, boolean value) throws JMSException
setBooleanProperty
in interface Message
JMSException
public void setBooleanProperty(String name, boolean value, boolean checkReadOnly) throws JMSException
JMSException
public void setByteProperty(String name, byte value) throws JMSException
setByteProperty
in interface Message
JMSException
public void setShortProperty(String name, short value) throws JMSException
setShortProperty
in interface Message
JMSException
public void setIntProperty(String name, int value) throws JMSException
setIntProperty
in interface Message
JMSException
public void setLongProperty(String name, long value) throws JMSException
setLongProperty
in interface Message
JMSException
public void setFloatProperty(String name, float value) throws JMSException
setFloatProperty
in interface Message
JMSException
public void setDoubleProperty(String name, double value) throws JMSException
setDoubleProperty
in interface Message
JMSException
public void setStringProperty(String name, String value) throws JMSException
setStringProperty
in interface Message
JMSException
protected void checkReadOnlyBody() throws MessageNotWriteableException
MessageNotWriteableException
public Callback getAcknowledgeCallback()
public void setAcknowledgeCallback(Callback acknowledgeCallback)
public void onSend() throws JMSException
JMSException
public Response visit(CommandVisitor visitor) throws Exception
public void storeContent()
storeContent
in class Message
public void storeContentAndClear()
storeContentAndClear
in class Message
Copyright © 2005–2016 The Apache Software Foundation. All rights reserved.