Package io.micronaut.jms.model
Class JMSHeaders
java.lang.Object
io.micronaut.jms.model.JMSHeaders
Utility class for access to the supported JMS Headers, and methods to
 extract those values from a given 
Message.- Since:
- 1.0.0
- Author:
- Elliott Pope
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringName of the Correlation ID header.static final StringName of the Delivery Mode header.static final StringName of the Delivery Time header.static final StringName of the Destination header.static final StringName of the Expiration header.static final StringName of the ID header.static final StringName of the Priority header.static final StringName of the Redelivered header.static final StringName of the Reply To header.static final StringName of the Timestamp header.static final StringName of the Type header.
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> TAttempts to retrieve the value of the header given byheaderNamefrom the givenmessage.static booleanisJMSHeader(String headerName) 
- 
Field Details- 
JMS_CORRELATION_IDName of the Correlation ID header. Specifies an ID so theMessagecan be linked to other messages.- See Also:
- 
- Message.getJMSCorrelationID()
- Constant Field Values
 
 
- 
JMS_DELIVERY_MODEName of the Delivery Mode header.- See Also:
- 
- Message.getJMSDeliveryMode()
- Constant Field Values
 
 
- 
JMS_DELIVERY_TIMEName of the Delivery Time header. Note: Only available when using a JMS 2.0 provider.- See Also:
- 
- Message.getJMSDeliveryTime()
- Constant Field Values
 
 
- 
JMS_DESTINATIONName of the Destination header. Specifies the destination of aMessageor where it was received from.- See Also:
- 
- Message.getJMSDestination()
- Constant Field Values
 
 
- 
JMS_EXPIRATIONName of the Expiration header.- See Also:
- 
- Message.getJMSExpiration()
- Constant Field Values
 
 
- 
JMS_MESSAGE_IDName of the ID header. Specifies a unique ID for aMessage.- See Also:
- 
- Message.getJMSMessageID()
- Constant Field Values
 
 
- 
JMS_PRIORITYName of the Priority header.- See Also:
- 
- Message.getJMSPriority()
- Constant Field Values
 
 
- 
JMS_REDELIVEREDName of the Redelivered header.- See Also:
- 
- Message.getJMSRedelivered()
- Constant Field Values
 
 
- 
JMS_REPLY_TOName of the Reply To header.- See Also:
- 
- Message.getJMSReplyTo()
- Constant Field Values
 
 
- 
JMS_TIMESTAMPName of the Timestamp header.- See Also:
- 
- Message.getJMSTimestamp()
- Constant Field Values
 
 
- 
JMS_TYPEName of the Type header.- See Also:
- 
- Message.getJMSType()
- Constant Field Values
 
 
 
- 
- 
Method Details- 
isJMSHeader- Parameters:
- headerName- the name of the header to test.
- Returns:
- true if the given headerNameis a supported JMS Header name
 
- 
getHeader@Nullable public static <T> T getHeader(String headerName, jakarta.jms.Message message, Class<T> clazz) Attempts to retrieve the value of the header given byheaderNamefrom the givenmessage. Returns null if no value is present, or an exception occurs when extracting the header.- Type Parameters:
- T- the expected class of the header value.
- Parameters:
- headerName- the name of the header to be extracted.
- message- the- Messageto extract the header from.
- clazz- the expected class of the header value.
- Returns:
- the value of the header on the given messagespecified byheaderNameas an object of typeclazz.
 
 
-