public final class JMSHeaders
extends java.lang.Object
Message.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
JMS_CORRELATION_ID
Name of the Correlation ID header.
|
static java.lang.String |
JMS_DELIVERY_MODE
Name of the Delivery Mode header.
|
static java.lang.String |
JMS_DELIVERY_TIME
Name of the Delivery Time header.
|
static java.lang.String |
JMS_DESTINATION
Name of the Destination header.
|
static java.lang.String |
JMS_EXPIRATION
Name of the Expiration header.
|
static java.lang.String |
JMS_MESSAGE_ID
Name of the ID header.
|
static java.lang.String |
JMS_PRIORITY
Name of the Priority header.
|
static java.lang.String |
JMS_REDELIVERED
Name of the Redelivered header.
|
static java.lang.String |
JMS_REPLY_TO
Name of the Reply To header.
|
static java.lang.String |
JMS_TIMESTAMP
Name of the Timestamp header.
|
static java.lang.String |
JMS_TYPE
Name of the Type header.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getHeader(java.lang.String headerName,
javax.jms.Message message,
java.lang.Class<T> clazz)
Attempts to retrieve the value of the header given by
headerName
from the given message. |
static boolean |
isJMSHeader(java.lang.String headerName) |
public static final java.lang.String JMS_CORRELATION_ID
Message
can be linked to other messages.Message.getJMSCorrelationID(),
Constant Field Valuespublic static final java.lang.String JMS_DELIVERY_MODE
Message.getJMSDeliveryMode(),
Constant Field Valuespublic static final java.lang.String JMS_DELIVERY_TIME
Message.getJMSDeliveryTime(),
Constant Field Valuespublic static final java.lang.String JMS_DESTINATION
Message or where it was received from.Message.getJMSDestination(),
Constant Field Valuespublic static final java.lang.String JMS_EXPIRATION
Message.getJMSExpiration(),
Constant Field Valuespublic static final java.lang.String JMS_MESSAGE_ID
Message.Message.getJMSMessageID(),
Constant Field Valuespublic static final java.lang.String JMS_PRIORITY
Message.getJMSPriority(),
Constant Field Valuespublic static final java.lang.String JMS_REDELIVERED
Message.getJMSRedelivered(),
Constant Field Valuespublic static final java.lang.String JMS_REPLY_TO
Message.getJMSReplyTo(),
Constant Field Valuespublic static final java.lang.String JMS_TIMESTAMP
Message.getJMSTimestamp(),
Constant Field Valuespublic static final java.lang.String JMS_TYPE
Message.getJMSType(),
Constant Field Valuespublic static boolean isJMSHeader(java.lang.String headerName)
headerName - the name of the header to test.headerName is a supported JMS Header name@Nullable
public static <T> T getHeader(java.lang.String headerName,
javax.jms.Message message,
java.lang.Class<T> clazz)
headerName
from the given message. Returns null if no value is present, or
an exception occurs when extracting the header.T - the expected class of the header value.headerName - the name of the header to be extracted.message - the Message to extract the header from.clazz - the expected class of the header value.message specified
by headerName as an object of type clazz.