|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.mapping.AbstractHeaderMapper<T>
public abstract class AbstractHeaderMapper<T>
Abstract base class for HeaderMapper implementations.
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
|
static java.lang.String |
STANDARD_REPLY_HEADER_NAME_PATTERN
|
static java.lang.String |
STANDARD_REQUEST_HEADER_NAME_PATTERN
|
Constructor Summary | |
---|---|
protected |
AbstractHeaderMapper()
|
Method Summary | ||
---|---|---|
protected abstract java.util.Map<java.lang.String,java.lang.Object> |
extractStandardHeaders(T source)
|
|
protected abstract java.util.Map<java.lang.String,java.lang.Object> |
extractUserDefinedHeaders(T source)
|
|
void |
fromHeadersToReply(MessageHeaders headers,
T target)
Maps headers from a Spring Integration MessageHeaders instance to the target instance matching on the set of REPLY headers (if different). |
|
void |
fromHeadersToRequest(MessageHeaders headers,
T target)
Maps headers from a Spring Integration MessageHeaders instance to the target instance matching on the set of REQUEST headers (if different). |
|
protected
|
getHeaderIfAvailable(java.util.Map<java.lang.String,java.lang.Object> headers,
java.lang.String name,
java.lang.Class<V> type)
|
|
protected abstract java.lang.String |
getStandardHeaderPrefix()
Returns the list of standard REPLY headers. |
|
protected java.util.List<java.lang.String> |
getStandardReplyHeaderNames()
Returns the list of standard REQUEST headers. |
|
protected java.util.List<java.lang.String> |
getStandardRequestHeaderNames()
Returns the PREFIX used by standard headers (if any) |
|
protected abstract void |
populateStandardHeaders(java.util.Map<java.lang.String,java.lang.Object> headers,
T target)
|
|
protected abstract void |
populateUserDefinedHeader(java.lang.String headerName,
java.lang.Object headerValue,
T target)
|
|
void |
setReplyHeaderNames(java.lang.String[] replyHeaderNames)
Provide the header names that should be mapped to a response (for inbound/outbound adapters) FROM a Spring Integration Message's headers. |
|
void |
setRequestHeaderNames(java.lang.String[] requestHeaderNames)
Provide the header names that should be mapped from a request (for inbound/outbound adapters) TO a Spring Integration Message's headers. |
|
void |
setUserDefinedHeaderPrefix(java.lang.String userDefinedHeaderPrefix)
Specify a prefix to be prepended to the header name for any integration message header that is being mapped to or from a user-defined value. |
|
java.util.Map<java.lang.String,java.lang.Object> |
toHeadersFromReply(T source)
Maps headers/properties of the target object to Map of MessageHeaders matching on the set of REPLY headers |
|
java.util.Map<java.lang.String,java.lang.Object> |
toHeadersFromRequest(T source)
Maps headers/properties of the target object to Map of MessageHeaders matching on the set of REQUEST headers |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STANDARD_REQUEST_HEADER_NAME_PATTERN
public static final java.lang.String STANDARD_REPLY_HEADER_NAME_PATTERN
protected final org.apache.commons.logging.Log logger
Constructor Detail |
---|
protected AbstractHeaderMapper()
Method Detail |
---|
public void setRequestHeaderNames(java.lang.String[] requestHeaderNames)
This will match the header name directly or, for non-standard headers, it will match
the header name prefixed with the value, if specified, by setUserDefinedHeaderPrefix(String)
.
public void setReplyHeaderNames(java.lang.String[] replyHeaderNames)
Any non-standard headers will be prefixed with the value specified by setUserDefinedHeaderPrefix(String)
.
public void setUserDefinedHeaderPrefix(java.lang.String userDefinedHeaderPrefix)
public void fromHeadersToRequest(MessageHeaders headers, T target)
fromHeadersToRequest
in interface RequestReplyHeaderMapper<T>
public void fromHeadersToReply(MessageHeaders headers, T target)
fromHeadersToReply
in interface RequestReplyHeaderMapper<T>
public java.util.Map<java.lang.String,java.lang.Object> toHeadersFromRequest(T source)
toHeadersFromRequest
in interface RequestReplyHeaderMapper<T>
public java.util.Map<java.lang.String,java.lang.Object> toHeadersFromReply(T source)
toHeadersFromReply
in interface RequestReplyHeaderMapper<T>
protected <V> V getHeaderIfAvailable(java.util.Map<java.lang.String,java.lang.Object> headers, java.lang.String name, java.lang.Class<V> type)
protected java.util.List<java.lang.String> getStandardReplyHeaderNames()
protected java.util.List<java.lang.String> getStandardRequestHeaderNames()
protected abstract java.lang.String getStandardHeaderPrefix()
protected abstract java.util.Map<java.lang.String,java.lang.Object> extractStandardHeaders(T source)
protected abstract java.util.Map<java.lang.String,java.lang.Object> extractUserDefinedHeaders(T source)
protected abstract void populateStandardHeaders(java.util.Map<java.lang.String,java.lang.Object> headers, T target)
protected abstract void populateUserDefinedHeader(java.lang.String headerName, java.lang.Object headerValue, T target)
|
Spring Integration | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |