WebSphere MQ class: JMSMessage
java.lang.Object | +----com.ibm.jms.MQJMSMessage |
The Message interface is the root interface of all JMS messages. It defines the JMS header and the acknowledge method used for all messages.
public static final int DEFAULT_DELIVERY_MODE
The default delivery mode value.
public static final int DEFAULT_PRIORITY
The default priority value.
public static final long DEFAULT_TIME_TO_LIVE
The default time to live value.
public void acknowledge() throws JMSException
Acknowledge this and all previous messages received by the session.
public void clearBody() throws JMSException
Clear out the message body. All other parts of the message are left untouched.
public void clearProperties() throws JMSException
Clear a message's properties. The header fields and message body are not cleared.
public boolean getBooleanProperty(java.lang.String name)
throws JMSException
Return the boolean property value with the given name.
public byte getByteProperty(java.lang.String name)
throws JMSException
Return the byte property value with the given name.
public double getDoubleProperty(java.lang.String name)
throws JMSException
Return the double property value with the given name.
public float getFloatProperty(java.lang.String name)
throws JMSException
Return the float property value with the given name.
public int getIntProperty(java.lang.String name)
throws JMSException
Return the integer property value with the given name.
public java.lang.String getJMSCorrelationID()
throws JMSException
Get the correlation ID for the message.
public byte[] getJMSCorrelationIDAsBytes()
throws JMSException
Get the correlation ID as an array of bytes for the message.
public int getJMSDeliveryMode() throws JMSException
Get the delivery mode for this message.
public Destination getJMSDestination() throws JMSException
Get the destination for this message.
public long getJMSExpiration() throws JMSException
Get the message's expiration value.
public java.lang.String getJMSMessageID()
throws JMSException
Get the message ID.
public int getJMSPriority() throws JMSException
Get the message priority.
public boolean getJMSRedelivered() throws JMSException
Get an indication of whether this message is being redelivered.
If a client receives a message with the redelivered indicator set, it is likely, but not guaranteed, that this message was delivered to the client earlier but the client did not acknowledge its receipt at that earlier time.
public Destination getJMSReplyTo() throws JMSException
Get where a reply to this message should be sent.
public long getJMSTimestamp() throws JMSException
Get the message timestamp.
public java.lang.String getJMSType() throws JMSException
Get the message type.
public long getLongProperty(java.lang.String name)
throws JMSException
Return the long property value with the given name.
public java.lang.Object getObjectProperty (java.lang.String name)
throws JMSException
Return the Java object property value with the given name.
public java.util.Enumeration getPropertyNames()
throws JMSException
Return an Enumeration of all the property names.
public short getShortProperty(java.lang.String name)
throws JMSException
Return the short property value with the given name.
public java.lang.String getStringProperty (java.lang.String name)
throws JMSException
Return the String property value with the given name.
public boolean propertyExists(java.lang.String name)
throws JMSException
Check if a property value exists.
public void setBooleanProperty(java.lang.String name,
boolean value) throws JMSException
Set a boolean property value with the given name into the Message.
public void setByteProperty(java.lang.String name,
byte value) throws JMSException
Set a byte property value with the given name into the Message.
public void setDoubleProperty(java.lang.String name,
double value) throws JMSException
Set a double property value with the given name into the Message.
public void setFloatProperty(java.lang.String name,
float value) throws JMSException
Set a float property value with the given name into the Message.
public void setIntProperty(java.lang.String name,
int value) throws JMSException
Set an integer property value with the given name into the Message.
public void setJMSCorrelationID
(java.lang.String correlationID)
throws JMSException
Set the correlation ID for the message.
A client can use the JMSCorrelationID header field to link one message with another. A typical use is to link a response message with its request message.
public void setJMSCorrelationIDAsBytes(byte[]
correlationID)
throws JMSException
Set the correlation ID as an array of bytes for the message. A client can use this call to set the correlationID equal either to a messageID from a previous message, or to an application-specific string. Application-specific strings must not start with the characters ID:
public void setJMSDeliveryMode(int deliveryMode)
throws JMSException
Set the delivery mode for this message.
Any value set using this method is ignored when the message is sent, but this method can be used to change the value in a received message.
To alter the delivery mode when a message is sent, use the setDeliveryMode method on the QueueSender or TopicPublisher (this method is inherited from MessageProducer).
public void setJMSDestination(Destination destination)
throws JMSexception
Set the destination for this message.
Any value set using this method is ignored when the message is sent, but this method can be used to change the value in a received message.
public void setJMSExpiration(long expiration)
throws JMSException
Set the message's expiration value.
Any value set using this method is ignored when the message is sent, but this method can be used to change the value in a received message.
public void setJMSMessageID(java.lang.String id)
throws JMSException
Set the message ID.
Any value set using this method is ignored when the message is sent, but this method can be used to change the value in a received message.
public void setJMSPriority(int priority)
throws JMSException
Set the priority for this message.
JMS defines a ten level priority value, with 0 as the lowest priority, and 9 as the highest. In addition, clients should consider priorities 0-4 as gradations of normal priority, and priorities 5-9 as gradations of expedited priority.
public void setJMSRedelivered(boolean redelivered)
throws JMSException
Set to indicate whether this message is being redelivered.
Any value set using this method is ignored when the message is sent, but this method can be used to change the value in a received message.
public void setJMSReplyTo(Destination replyTo)
throws JMSException
Set where a reply to this message should be sent.
public void setJMSTimestamp(long timestamp)
throws JMSException
Set the message timestamp.
Any value set using this method is ignored when the message is sent, but this method can be used to change the value in a received message.
public void setJMSType(java.lang.String type)
throws JMSException
Set the message type.
JMS clients should assign a value to type whether the application makes use of it or not. This ensures that it is properly set for those providers that require it.
public void setLongProperty(java.lang.String name,
long value) throws JMSException
Set a long property value with the given name into the Message.
public void setObjectProperty(java.lang.String name,
java.lang.Object value) throws JMSException
Set a property value with the given name into the Message.
public void setShortProperty(java.lang.String name,
short value) throws JMSException
Set a short property value with the given name into the Message.
public void setStringProperty(java.lang.String name,
java.lang.String value) throws JMSException
Set a String property value with the given name into the Message.