org.springframework.integration.http
Class HttpOutboundEndpoint

java.lang.Object
  extended by org.springframework.integration.handler.AbstractMessageHandler
      extended by org.springframework.integration.handler.AbstractReplyProducingMessageHandler
          extended by 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

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
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.
 
Method Summary
protected  void handleRequestMessage(Message<?> requestMessage, ReplyMessageHolder replyMessageHolder)
           
 void setRequestExecutor(HttpRequestExecutor requestExecutor)
          Specify the HttpRequestExecutor to use for executing the HttpRequest instances at runtime.
 void setRequestMapper(OutboundRequestMapper requestMapper)
          Specify an OutboundRequestMapper implementation to map from Messages to outbound HttpRequest objects.
 
Methods inherited from class org.springframework.integration.handler.AbstractReplyProducingMessageHandler
getOutputChannel, handleMessageInternal, sendReplyMessage, setBeanFactory, setChannelResolver, setOutputChannel, setRequiresReply, setSendTimeout
 
Methods inherited from class org.springframework.integration.handler.AbstractMessageHandler
getOrder, handleMessage, setOrder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.

Method Detail

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