Class AbstractHeaderMapper<T>
java.lang.Object
org.springframework.messaging.support.AbstractHeaderMapper<T>
- Type Parameters:
T
- type of the instance to and from which headers will be mapped
- All Implemented Interfaces:
HeaderMapper<T>
- Direct Known Subclasses:
SimpleJmsHeaderMapper
A base
HeaderMapper
implementation.- Since:
- 4.1
- Author:
- Stephane Nicoll
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
fromHeaderName
(String headerName) Generate the name to use to set the header defined by the specifiedheaderName
to the protocol specific message.protected <V> V
Return the header value, ornull
if it does not exist or does not match the requestedtype
.void
setInboundPrefix
(String inboundPrefix) Specify a prefix to be appended to the message header name for any user-defined property that is being mapped into the MessageHeaders.void
setOutboundPrefix
(String outboundPrefix) Specify a prefix to be appended to the protocol property name for any user-defined message header that is being mapped into the protocol-specific Message.protected String
toHeaderName
(String propertyName) Generate the name to use to set the header defined by the specifiedpropertyName
to theMessageHeaders
instance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.messaging.support.HeaderMapper
fromHeaders, toHeaders
-
Field Details
-
logger
-
-
Constructor Details
-
AbstractHeaderMapper
public AbstractHeaderMapper()
-
-
Method Details
-
setInboundPrefix
Specify a prefix to be appended to the message header name for any user-defined property that is being mapped into the MessageHeaders. The default is an empty String (no prefix). -
setOutboundPrefix
Specify a prefix to be appended to the protocol property name for any user-defined message header that is being mapped into the protocol-specific Message. The default is an empty String (no prefix). -
fromHeaderName
Generate the name to use to set the header defined by the specifiedheaderName
to the protocol specific message.- See Also:
-
toHeaderName
Generate the name to use to set the header defined by the specifiedpropertyName
to theMessageHeaders
instance.- See Also:
-
getHeaderIfAvailable
@Nullable protected <V> V getHeaderIfAvailable(Map<String, Object> headers, String name, Class<V> type) Return the header value, ornull
if it does not exist or does not match the requestedtype
.
-