org.springframework.integration.http
Class HttpOutboundEndpoint
java.lang.Object
org.springframework.integration.handler.AbstractMessageHandler
org.springframework.integration.handler.AbstractReplyProducingMessageHandler
org.springframework.integration.http.HttpOutboundEndpoint
- All Implemented Interfaces:
- org.springframework.beans.factory.BeanFactoryAware, org.springframework.core.Ordered, MessageHandler
public class HttpOutboundEndpoint
- extends AbstractReplyProducingMessageHandler
An outbound endpoint that maps a request Message to an HttpRequest
,
executes that request, and then maps the response to a reply Message.
- Since:
- 1.0.2
- Author:
- Mark Fisher
Fields inherited from interface org.springframework.core.Ordered |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Constructor Summary |
HttpOutboundEndpoint()
Create an HttpOutboundEndpoint with no default URL. |
HttpOutboundEndpoint(java.net.URL defaultUrl)
Create an HttpOutboundEndpoint that will send requests to the provided
URL by default. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpOutboundEndpoint
public HttpOutboundEndpoint()
- Create an HttpOutboundEndpoint with no default URL.
HttpOutboundEndpoint
public HttpOutboundEndpoint(java.net.URL defaultUrl)
- Create an HttpOutboundEndpoint that will send requests to the provided
URL by default. If a Message contains a valid value for the
HttpHeaders.REQUEST_URL
header, that will take precedence.
If a custom OutboundRequestMapper
instance is registered
through the setRequestMapper(OutboundRequestMapper)
method,
this default URL will not be used.
setRequestMapper
public void setRequestMapper(OutboundRequestMapper requestMapper)
- Specify an
OutboundRequestMapper
implementation to map from
Messages to outbound HttpRequest
objects. The default
implementation is DefaultOutboundRequestMapper
.
setRequestExecutor
public void setRequestExecutor(HttpRequestExecutor requestExecutor)
- Specify the
HttpRequestExecutor
to use for executing the
HttpRequest
instances at runtime. The default implementation
is SimpleHttpRequestExecutor
.
handleRequestMessage
protected void handleRequestMessage(Message<?> requestMessage,
ReplyMessageHolder replyMessageHolder)
- Specified by:
handleRequestMessage
in class AbstractReplyProducingMessageHandler