|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.context.IntegrationObjectSupport org.springframework.integration.handler.AbstractMessageHandler org.springframework.integration.handler.AbstractReplyProducingMessageHandler org.springframework.integration.http.HttpRequestExecutingMessageHandler
public class HttpRequestExecutingMessageHandler
A MessageHandler
implementation that executes HTTP requests by delegating
to a RestTemplate
instance.
Field Summary |
---|
Fields inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler |
---|
DEFAULT_SEND_TIMEOUT |
Fields inherited from class org.springframework.integration.handler.AbstractMessageHandler |
---|
logger |
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary | |
---|---|
HttpRequestExecutingMessageHandler(String uri)
Create a handler that will send requests to the provided URI. |
|
HttpRequestExecutingMessageHandler(URI uri)
Create a handler that will send requests to the provided URI. |
Method Summary | |
---|---|
protected Object |
handleRequestMessage(Message<?> requestMessage)
Subclasses must implement this method to handle the request Message. |
void |
onInit()
Subclasses may implement this for initialization logic. |
void |
setCharset(String charset)
Specify the charset name to use for converting String-typed payloads to bytes. |
void |
setErrorHandler(ResponseErrorHandler errorHandler)
Set the ResponseErrorHandler for the underlying RestTemplate . |
void |
setExpectedResponseType(Class<?> expectedResponseType)
Specify the expected response type for the REST request. |
void |
setExpectReply(boolean expectReply)
Specify whether a reply Message is expected. |
void |
setExtractPayload(boolean extractPayload)
Specify whether the outbound message's payload should be extracted when preparing the request body. |
void |
setHeaderMapper(HeaderMapper<HttpHeaders> headerMapper)
Set the HeaderMapper to use when mapping between HTTP headers and MessageHeaders. |
void |
setHttpMethod(HttpMethod httpMethod)
Specify the HttpMethod for requests. |
void |
setMessageConverters(List<HttpMessageConverter<?>> messageConverters)
Set a list of HttpMessageConverter s to be used by the underlying RestTemplate . |
void |
setRequestFactory(ClientHttpRequestFactory requestFactory)
Set the ClientHttpRequestFactory for the underlying RestTemplate . |
void |
setUriVariableExpressions(Map<String,String> uriVariableExpressions)
Set the Map of URI variable expressions to evaluate against the outbound message when replacing the variable placeholders in a URI template. |
Methods inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler |
---|
getMessagingTemplate, handleMessageInternal, setChannelResolver, setOutputChannel, setRequiresReply, setSendTimeout, shouldCopyRequestHeaders |
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler |
---|
getComponentType, getOrder, handleMessage, setOrder, setShouldTrack |
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport |
---|
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getRequiredMetadataPersister, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, setTaskScheduler, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.springframework.integration.context.NamedComponent |
---|
getComponentName |
Constructor Detail |
---|
public HttpRequestExecutingMessageHandler(URI uri)
public HttpRequestExecutingMessageHandler(String uri)
Method Detail |
---|
public void setHttpMethod(HttpMethod httpMethod)
HttpMethod
for requests. The default method will be POST.
public void setExtractPayload(boolean extractPayload)
true
.
public void setCharset(String charset)
public void setExpectReply(boolean expectReply)
public void setExpectedResponseType(Class<?> expectedResponseType)
public void setErrorHandler(ResponseErrorHandler errorHandler)
ResponseErrorHandler
for the underlying RestTemplate
.
RestTemplate.setErrorHandler(ResponseErrorHandler)
public void setMessageConverters(List<HttpMessageConverter<?>> messageConverters)
HttpMessageConverter
s to be used by the underlying RestTemplate
.
Converters configured via this method will override the default converters.
RestTemplate.setMessageConverters(java.util.List)
public void setHeaderMapper(HeaderMapper<HttpHeaders> headerMapper)
HeaderMapper
to use when mapping between HTTP headers and MessageHeaders.
public void setRequestFactory(ClientHttpRequestFactory requestFactory)
ClientHttpRequestFactory
for the underlying RestTemplate
.
HttpAccessor.setRequestFactory(ClientHttpRequestFactory)
public void setUriVariableExpressions(Map<String,String> uriVariableExpressions)
public void onInit()
IntegrationObjectSupport
onInit
in class AbstractReplyProducingMessageHandler
protected Object handleRequestMessage(Message<?> requestMessage)
AbstractReplyProducingMessageHandler
handleRequestMessage
in class AbstractReplyProducingMessageHandler
|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |