public class DefaultHttpHeaderMapper extends Object implements HeaderMapper<org.springframework.http.HttpHeaders>, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean
HeaderMapper
implementation for HTTP.Modifier and Type | Field and Description |
---|---|
static String |
COOKIE |
static String |
HTTP_REQUEST_HEADER_NAME_PATTERN |
static String |
HTTP_RESPONSE_HEADER_NAME_PATTERN |
static String |
SET_COOKIE |
Constructor and Description |
---|
DefaultHttpHeaderMapper() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
fromHeaders(MessageHeaders headers,
org.springframework.http.HttpHeaders target)
Map from the integration MessageHeaders to an HttpHeaders instance.
|
static DefaultHttpHeaderMapper |
inboundMapper()
Factory method for creating a basic inbound mapper instance.
|
static DefaultHttpHeaderMapper |
outboundMapper()
Factory method for creating a basic outbound mapper instance.
|
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setExcludedInboundStandardResponseHeaderNames(String[] excludedInboundStandardResponseHeaderNames)
Provide header names from the list of standard headers that should be suppressed when
mapping inbound endopoint response headers.
|
void |
setExcludedOutboundStandardRequestHeaderNames(String[] excludedOutboundStandardRequestHeaderNames)
Provide header names from the list of standard headers that should be suppressed when
mapping outbound endpoint request headers.
|
void |
setInboundHeaderNames(String[] inboundHeaderNames)
Provide the header names that should be mapped from an HTTP request (for inbound adapters)
or HTTP response (for outbound adapters) to a Spring Integration Message's headers.
|
void |
setOutboundHeaderNames(String[] outboundHeaderNames)
Provide the header names that should be mapped to an HTTP request (for outbound adapters)
or HTTP response (for inbound adapters) from a Spring Integration Message's headers.
|
void |
setUserDefinedHeaderPrefix(String userDefinedHeaderPrefix)
Sets the prefix to use with user-defined (non-standard) headers.
|
Map<String,Object> |
toHeaders(org.springframework.http.HttpHeaders source)
Map from an HttpHeaders instance to integration MessageHeaders.
|
public static final String COOKIE
public static final String SET_COOKIE
public static final String HTTP_REQUEST_HEADER_NAME_PATTERN
public static final String HTTP_RESPONSE_HEADER_NAME_PATTERN
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
org.springframework.beans.BeansException
public void setOutboundHeaderNames(String[] outboundHeaderNames)
Any non-standard headers will be prefixed with the value specified by
setUserDefinedHeaderPrefix(String)
. The default is 'X-'.
public void setInboundHeaderNames(String[] inboundHeaderNames)
This will match the header name directly or, for non-standard HTTP headers, it will match
the header name prefixed with the value specified by
setUserDefinedHeaderPrefix(String)
. The default is 'X-'.
public void setExcludedOutboundStandardRequestHeaderNames(String[] excludedOutboundStandardRequestHeaderNames)
excludedOutboundStandardRequestHeaderNames
- the excludedStandardRequestHeaderNames to setpublic void setExcludedInboundStandardResponseHeaderNames(String[] excludedInboundStandardResponseHeaderNames)
excludedInboundStandardResponseHeaderNames
- the excludedStandardResponseHeaderNames to setpublic void setUserDefinedHeaderPrefix(String userDefinedHeaderPrefix)
public void fromHeaders(MessageHeaders headers, org.springframework.http.HttpHeaders target)
fromHeaders
in interface HeaderMapper<org.springframework.http.HttpHeaders>
public Map<String,Object> toHeaders(org.springframework.http.HttpHeaders source)
toHeaders
in interface HeaderMapper<org.springframework.http.HttpHeaders>
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
public static DefaultHttpHeaderMapper outboundMapper()
public static DefaultHttpHeaderMapper inboundMapper()
Copyright © 2018. All rights reserved.