Package org.springframework.jms.support
Class JmsMessageHeaderAccessor
- java.lang.Object
- org.springframework.messaging.support.MessageHeaderAccessor
- org.springframework.messaging.support.NativeMessageHeaderAccessor
- org.springframework.jms.support.JmsMessageHeaderAccessor
public class JmsMessageHeaderAccessor extends NativeMessageHeaderAccessor
AMessageHeaderAccessor
implementation giving access to JMS-specific headers.- Since:
- 4.1
- Author:
- Stephane Nicoll
Field Summary
Fields inherited from class org.springframework.messaging.support.NativeMessageHeaderAccessor
NATIVE_HEADERS
Fields inherited from class org.springframework.messaging.support.MessageHeaderAccessor
DEFAULT_CHARSET
Constructor Summary
Constructors Modifier Constructor Description protected
JmsMessageHeaderAccessor(Map<String,List<String>> nativeHeaders)
protected
JmsMessageHeaderAccessor(Message<?> message)
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCorrelationId()
Return thecorrelationId
.Integer
getDeliveryMode()
Return thedelivery mode
.Destination
getDestination()
Return thedestination
.Long
getExpiration()
Return the messageexpiration
.String
getMessageId()
Return themessage id
.Integer
getPriority()
Return thepriority
.Boolean
getRedelivered()
Return theredelivered
flag.Destination
getReplyTo()
Return thereply to
.Long
getTimestamp()
Return thetimestamp
.String
getType()
Return thetype
.static JmsMessageHeaderAccessor
wrap(Message<?> message)
Create aJmsMessageHeaderAccessor
from the headers of an existing message.Methods inherited from class org.springframework.messaging.support.NativeMessageHeaderAccessor
addNativeHeader, addNativeHeaders, containsNativeHeader, copyHeaders, copyHeadersIfAbsent, getFirstNativeHeader, getFirstNativeHeader, getNativeHeader, getNativeHeaders, removeNativeHeader, setImmutable, setNativeHeader, setNativeHeaderValues, toNativeHeaderMap
Methods inherited from class org.springframework.messaging.support.MessageHeaderAccessor
createAccessor, getAccessor, getAccessor, getAccessor, getContentType, getDetailedLogMessage, getDetailedPayloadLogMessage, getErrorChannel, getHeader, getId, getMessageHeaders, getMutableAccessor, getReplyChannel, getShortLogMessage, getShortPayloadLogMessage, isModified, isMutable, isReadableContentType, isReadOnly, removeHeader, removeHeaders, setContentType, setErrorChannel, setErrorChannelName, setHeader, setHeaderIfAbsent, setLeaveMutable, setModified, setReplyChannel, setReplyChannelName, toMap, toMessageHeaders, toString, verifyType
Constructor Detail
JmsMessageHeaderAccessor
protected JmsMessageHeaderAccessor(Map<String,List<String>> nativeHeaders)
JmsMessageHeaderAccessor
protected JmsMessageHeaderAccessor(Message<?> message)
Method Detail
getCorrelationId
@Nullable public String getCorrelationId()
Return thecorrelationId
.- See Also:
JmsHeaders.CORRELATION_ID
getDestination
@Nullable public Destination getDestination()
Return thedestination
.- See Also:
JmsHeaders.DESTINATION
getDeliveryMode
@Nullable public Integer getDeliveryMode()
Return thedelivery mode
.- See Also:
JmsHeaders.DELIVERY_MODE
getExpiration
@Nullable public Long getExpiration()
Return the messageexpiration
.- See Also:
JmsHeaders.EXPIRATION
getMessageId
@Nullable public String getMessageId()
Return themessage id
.- See Also:
JmsHeaders.MESSAGE_ID
getPriority
@Nullable public Integer getPriority()
Return thepriority
.- See Also:
JmsHeaders.PRIORITY
getReplyTo
@Nullable public Destination getReplyTo()
Return thereply to
.- See Also:
JmsHeaders.REPLY_TO
getRedelivered
@Nullable public Boolean getRedelivered()
Return theredelivered
flag.- See Also:
JmsHeaders.REDELIVERED
getType
@Nullable public String getType()
Return thetype
.- See Also:
JmsHeaders.TYPE
getTimestamp
@Nullable public Long getTimestamp()
Return thetimestamp
.- Overrides:
getTimestamp
in classMessageHeaderAccessor
- See Also:
JmsHeaders.TIMESTAMP
wrap
public static JmsMessageHeaderAccessor wrap(Message<?> message)
Create aJmsMessageHeaderAccessor
from the headers of an existing message.