A MessageHandler implementation that executes HTTP requests by delegating
to a RestTemplate instance. If the 'expectReply' flag is set to true (the default)
then a reply Message will be generated from the HTTP response. If that response contains
a body, it will be used as the reply Message's payload. Otherwise the reply Message's
payload will contain the response status as an instance of the HttpStatus enum.
When there is a response body, the HttpStatus enum instance will instead be
copied to the MessageHeaders of the reply. In both cases, the response headers will
be mapped to the reply Message's headers by this handler's HeaderMapper instance.

HttpRequestExecutingMessageHandler(java.lang.String uri,
org.springframework.web.client.RestTemplate restTemplate)
Create a handler that will send requests to the provided URI using a provided RestTemplate

setMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)
Set a list of HttpMessageConverters to be used by the underlying RestTemplate.

void

setRequestFactory(org.springframework.http.client.ClientHttpRequestFactory requestFactory)
Set the ClientHttpRequestFactory for the underlying RestTemplate.

void

setTransferCookies(boolean transferCookies)
Set to true if you wish 'Set-Cookie' headers in responses to be
transferred as 'Cookie' headers in subsequent interactions for
a message.

void

setUriVariableExpressions(java.util.Map<java.lang.String,org.springframework.expression.Expression> uriVariableExpressions)
Set the Map of URI variable expressions to evaluate against the outbound message
when replacing the variable placeholders in a URI template.

setExpectedResponseType

Specify the expected response type for the REST request.
If this is null (the default), only the status code will be returned
as the reply Message payload. To take advantage of the HttpMessageConverters
registered on this adapter, provide a different type).

handleRequestMessage

Subclasses must implement this method to handle the request Message. The return
value may be a Message, a MessageBuilder, or any plain Object. The base class
will handle the final creation of a reply Message from any of those starting
points. If the return value is null, the Message flow will end here.