public class ActiveMQMessage extends Object implements javax.jms.Message
| Modifier and Type | Field and Description |
|---|---|
protected ClientMessage |
message |
static SimpleString |
OLD_QUEUE_QUALIFIED_PREFIX |
static SimpleString |
OLD_TEMP_QUEUE_QUALIFED_PREFIX |
static SimpleString |
OLD_TEMP_TOPIC_QUALIFED_PREFIX |
static SimpleString |
OLD_TOPIC_QUALIFIED_PREFIX |
protected boolean |
propertiesReadOnly |
protected boolean |
readOnly |
protected javax.jms.Destination |
replyTo |
static byte |
TYPE |
| Modifier | Constructor and Description |
|---|---|
|
ActiveMQMessage() |
protected |
ActiveMQMessage(byte type,
ClientSession session) |
|
ActiveMQMessage(ClientMessage message,
ClientSession session)
Constructor for when receiving a message from the server
|
protected |
ActiveMQMessage(ClientSession session) |
protected |
ActiveMQMessage(javax.jms.Message foreign,
byte type,
ClientSession session) |
|
ActiveMQMessage(javax.jms.Message foreign,
ClientSession session) |
public static final byte TYPE
public static final SimpleString OLD_QUEUE_QUALIFIED_PREFIX
public static final SimpleString OLD_TEMP_QUEUE_QUALIFED_PREFIX
public static final SimpleString OLD_TOPIC_QUALIFIED_PREFIX
public static final SimpleString OLD_TEMP_TOPIC_QUALIFED_PREFIX
protected ClientMessage message
protected boolean readOnly
protected boolean propertiesReadOnly
protected javax.jms.Destination replyTo
protected ActiveMQMessage(byte type,
ClientSession session)
protected ActiveMQMessage(ClientSession session)
public ActiveMQMessage(ClientMessage message, ClientSession session)
public ActiveMQMessage(javax.jms.Message foreign,
ClientSession session)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic ActiveMQMessage()
protected ActiveMQMessage(javax.jms.Message foreign,
byte type,
ClientSession session)
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic static CompositeData coreCompositeTypeToJMSCompositeType(CompositeDataSupport data) throws Exception
Exceptionpublic static ActiveMQMessage createMessage(ClientMessage message, ClientSession session)
public static ActiveMQMessage createMessage(ClientMessage message, ClientSession session, ConnectionFactoryOptions options)
public String getJMSMessageID()
getJMSMessageID in interface javax.jms.Messagepublic void setJMSMessageID(String jmsMessageID) throws javax.jms.JMSException
setJMSMessageID in interface javax.jms.Messagejavax.jms.JMSExceptionpublic long getJMSTimestamp()
throws javax.jms.JMSException
getJMSTimestamp in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setJMSTimestamp(long timestamp)
throws javax.jms.JMSException
setJMSTimestamp in interface javax.jms.Messagejavax.jms.JMSExceptionpublic byte[] getJMSCorrelationIDAsBytes()
throws javax.jms.JMSException
getJMSCorrelationIDAsBytes in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setJMSCorrelationIDAsBytes(byte[] correlationID)
throws javax.jms.JMSException
setJMSCorrelationIDAsBytes in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setJMSCorrelationID(String correlationID) throws javax.jms.JMSException
setJMSCorrelationID in interface javax.jms.Messagejavax.jms.JMSExceptionpublic String getJMSCorrelationID() throws javax.jms.JMSException
getJMSCorrelationID in interface javax.jms.Messagejavax.jms.JMSExceptionpublic javax.jms.Destination getJMSReplyTo()
throws javax.jms.JMSException
getJMSReplyTo in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setJMSReplyTo(javax.jms.Destination dest)
throws javax.jms.JMSException
setJMSReplyTo in interface javax.jms.Messagejavax.jms.JMSExceptionpublic static String prefixOf(javax.jms.Destination dest)
protected SimpleString checkPrefix(SimpleString address)
protected SimpleString checkPrefixStr(SimpleString address)
public javax.jms.Destination getJMSDestination()
throws javax.jms.JMSException
getJMSDestination in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setJMSDestination(javax.jms.Destination destination)
throws javax.jms.JMSException
setJMSDestination in interface javax.jms.Messagejavax.jms.JMSExceptionpublic int getJMSDeliveryMode()
throws javax.jms.JMSException
getJMSDeliveryMode in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setJMSDeliveryMode(int deliveryMode)
throws javax.jms.JMSException
setJMSDeliveryMode in interface javax.jms.Messagejavax.jms.JMSExceptionpublic boolean getJMSRedelivered()
throws javax.jms.JMSException
getJMSRedelivered in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setJMSRedelivered(boolean redelivered)
throws javax.jms.JMSException
setJMSRedelivered in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setJMSType(String type) throws javax.jms.JMSException
setJMSType in interface javax.jms.Messagejavax.jms.JMSExceptionpublic String getJMSType() throws javax.jms.JMSException
getJMSType in interface javax.jms.Messagejavax.jms.JMSExceptionpublic long getJMSExpiration()
throws javax.jms.JMSException
getJMSExpiration in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setJMSExpiration(long expiration)
throws javax.jms.JMSException
setJMSExpiration in interface javax.jms.Messagejavax.jms.JMSExceptionpublic int getJMSPriority()
throws javax.jms.JMSException
getJMSPriority in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setJMSPriority(int priority)
throws javax.jms.JMSException
setJMSPriority in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void clearProperties()
throws javax.jms.JMSException
clearProperties in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void clearBody()
throws javax.jms.JMSException
clearBody in interface javax.jms.Messagejavax.jms.JMSExceptionpublic boolean propertyExists(String name) throws javax.jms.JMSException
propertyExists in interface javax.jms.Messagejavax.jms.JMSExceptionpublic boolean getBooleanProperty(String name) throws javax.jms.JMSException
getBooleanProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic byte getByteProperty(String name) throws javax.jms.JMSException
getByteProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic short getShortProperty(String name) throws javax.jms.JMSException
getShortProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic int getIntProperty(String name) throws javax.jms.JMSException
getIntProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic long getLongProperty(String name) throws javax.jms.JMSException
getLongProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic float getFloatProperty(String name) throws javax.jms.JMSException
getFloatProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic double getDoubleProperty(String name) throws javax.jms.JMSException
getDoubleProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic String getStringProperty(String name) throws javax.jms.JMSException
getStringProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic Object getObjectProperty(String name) throws javax.jms.JMSException
getObjectProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic Enumeration getPropertyNames() throws javax.jms.JMSException
getPropertyNames in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setBooleanProperty(String name, boolean value) throws javax.jms.JMSException
setBooleanProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setByteProperty(String name, byte value) throws javax.jms.JMSException
setByteProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setShortProperty(String name, short value) throws javax.jms.JMSException
setShortProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setIntProperty(String name, int value) throws javax.jms.JMSException
setIntProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setLongProperty(String name, long value) throws javax.jms.JMSException
setLongProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setFloatProperty(String name, float value) throws javax.jms.JMSException
setFloatProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setDoubleProperty(String name, double value) throws javax.jms.JMSException
setDoubleProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setStringProperty(String name, String value) throws javax.jms.JMSException
setStringProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setObjectProperty(String name, Object value) throws javax.jms.JMSException
setObjectProperty in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void acknowledge()
throws javax.jms.JMSException
acknowledge in interface javax.jms.Messagejavax.jms.JMSExceptionpublic long getJMSDeliveryTime()
throws javax.jms.JMSException
getJMSDeliveryTime in interface javax.jms.Messagejavax.jms.JMSExceptionpublic void setJMSDeliveryTime(long deliveryTime)
throws javax.jms.JMSException
setJMSDeliveryTime in interface javax.jms.Messagejavax.jms.JMSExceptionpublic <T> T getBody(Class<T> c) throws javax.jms.JMSException
getBody in interface javax.jms.Messagejavax.jms.JMSExceptionprotected <T> T getBodyInternal(Class<T> c) throws javax.jms.MessageFormatException
javax.jms.MessageFormatExceptionpublic boolean isBodyAssignableTo(Class c)
isBodyAssignableTo in interface javax.jms.Messageprotected boolean hasNoBody()
isBodyAssignableTo(Class).public void setIndividualAcknowledge()
public void setClientAcknowledge()
public void resetMessageID(String newMsgID)
public ClientMessage getCoreMessage()
public void checkBuffer()
public void doBeforeReceive()
throws ActiveMQException
ActiveMQExceptionpublic byte getType()
public void setInputStream(InputStream input) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void setOutputStream(OutputStream output) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void saveToOutputStream(OutputStream output) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic boolean waitCompletionOnStream(long timeWait)
throws javax.jms.JMSException
javax.jms.JMSExceptionprotected void checkWrite()
throws javax.jms.JMSException
javax.jms.JMSExceptionprotected void checkRead()
throws javax.jms.JMSException
javax.jms.JMSExceptionCopyright © 2020 The Apache Software Foundation. All rights reserved.