java.lang.Object
org.springframework.integration.http.dsl.Http

public final class Http extends Object
The HTTP components Factory.
Since:
5.0
Author:
Artem Bilan, Shiliang Li
  • Method Details

    • outboundChannelAdapter

      public static HttpMessageHandlerSpec outboundChannelAdapter(URI uri)
      Create an HttpMessageHandlerSpec builder for one-way adapter based on provided URI.
      Parameters:
      uri - the URI to send requests.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundChannelAdapter

      public static HttpMessageHandlerSpec outboundChannelAdapter(String uri)
      Create an HttpMessageHandlerSpec builder for one-way adapter based on provided uri.
      Parameters:
      uri - the uri to send requests.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundChannelAdapter

      public static <P> HttpMessageHandlerSpec outboundChannelAdapter(Function<Message<P>,?> uriFunction)
      Create an HttpMessageHandlerSpec builder for one-way adapter based on provided Function to evaluate target uri against request message.
      Type Parameters:
      P - the expected payload type.
      Parameters:
      uriFunction - the Function to evaluate uri at runtime.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundChannelAdapter

      public static HttpMessageHandlerSpec outboundChannelAdapter(Expression uriExpression)
      Create an HttpMessageHandlerSpec builder for one-way adapter based on provided SpEL Expression to evaluate target uri against request message.
      Parameters:
      uriExpression - the SpEL Expression to evaluate uri at runtime.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundChannelAdapter

      public static HttpMessageHandlerSpec outboundChannelAdapter(URI uri, @Nullable RestTemplate restTemplate)
      Create an HttpMessageHandlerSpec builder for one-way adapter based on provided URI and RestTemplate.
      Parameters:
      uri - the URI to send requests.
      restTemplate - RestTemplate to use.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundChannelAdapter

      public static HttpMessageHandlerSpec outboundChannelAdapter(String uri, @Nullable RestTemplate restTemplate)
      Create an HttpMessageHandlerSpec builder for one-way adapter based on provided uri and RestTemplate.
      Parameters:
      uri - the uri to send requests.
      restTemplate - RestTemplate to use.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundChannelAdapter

      public static <P> HttpMessageHandlerSpec outboundChannelAdapter(Function<Message<P>,?> uriFunction, RestTemplate restTemplate)
      Create an HttpMessageHandlerSpec builder for one-way adapter based on provided Function to evaluate target uri against request message and RestTemplate for HTTP exchanges.
      Type Parameters:
      P - the expected payload type.
      Parameters:
      uriFunction - the Function to evaluate uri at runtime.
      restTemplate - RestTemplate to use.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundChannelAdapter

      public static HttpMessageHandlerSpec outboundChannelAdapter(Expression uriExpression, @Nullable RestTemplate restTemplate)
      Create an HttpMessageHandlerSpec builder for one-way adapter based on provided SpEL Expression to evaluate target uri against request message and RestTemplate for HTTP exchanges.
      Parameters:
      uriExpression - the SpEL Expression to evaluate uri at runtime.
      restTemplate - RestTemplate to use.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundGateway

      public static HttpMessageHandlerSpec outboundGateway(URI uri)
      Create an HttpMessageHandlerSpec builder for request-reply gateway based on provided URI.
      Parameters:
      uri - the URI to send requests.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundGateway

      public static HttpMessageHandlerSpec outboundGateway(String uri)
      Create an HttpMessageHandlerSpec builder for request-reply gateway based on provided uri.
      Parameters:
      uri - the uri to send requests.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundGateway

      public static <P> HttpMessageHandlerSpec outboundGateway(Function<Message<P>,?> uriFunction)
      Create an HttpMessageHandlerSpec builder for request-reply gateway based on provided Function to evaluate target uri against request message.
      Type Parameters:
      P - the expected payload type.
      Parameters:
      uriFunction - the Function to evaluate uri at runtime.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundGateway

      public static HttpMessageHandlerSpec outboundGateway(Expression uriExpression)
      Create an HttpMessageHandlerSpec builder for request-reply gateway based on provided SpEL Expression to evaluate target uri against request message.
      Parameters:
      uriExpression - the SpEL Expression to evaluate uri at runtime.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundGateway

      public static HttpMessageHandlerSpec outboundGateway(URI uri, @Nullable RestTemplate restTemplate)
      Create an HttpMessageHandlerSpec builder for request-reply gateway based on provided URI and RestTemplate.
      Parameters:
      uri - the URI to send requests.
      restTemplate - RestTemplate to use.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundGateway

      public static HttpMessageHandlerSpec outboundGateway(String uri, @Nullable RestTemplate restTemplate)
      Create an HttpMessageHandlerSpec builder for request-reply gateway based on provided uri and RestTemplate.
      Parameters:
      uri - the uri to send requests.
      restTemplate - RestTemplate to use.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundGateway

      public static <P> HttpMessageHandlerSpec outboundGateway(Function<Message<P>,?> uriFunction, RestTemplate restTemplate)
      Create an HttpMessageHandlerSpec builder for request-reply gateway based on provided Function to evaluate target uri against request message and RestTemplate for HTTP exchanges.
      Type Parameters:
      P - the expected payload type.
      Parameters:
      uriFunction - the Function to evaluate uri at runtime.
      restTemplate - RestTemplate to use.
      Returns:
      the HttpMessageHandlerSpec instance
    • outboundGateway

      public static HttpMessageHandlerSpec outboundGateway(Expression uriExpression, @Nullable RestTemplate restTemplate)
      Create an HttpMessageHandlerSpec builder for request-reply gateway based on provided SpEL Expression to evaluate target uri against request message and RestTemplate for HTTP exchanges.
      Parameters:
      uriExpression - the SpEL Expression to evaluate uri at runtime.
      restTemplate - RestTemplate to use.
      Returns:
      the HttpMessageHandlerSpec instance
    • inboundControllerAdapter

      public static HttpControllerEndpointSpec inboundControllerAdapter(String viewName, String... path)
      Create an HttpControllerEndpointSpec builder for one-way adapter based on the provided MVC viewName and path array for mapping.
      Parameters:
      viewName - the MVC view name to build in the end of request.
      path - the path mapping URIs (e.g. "/myPath.do").
      Returns:
      the HttpControllerEndpointSpec instance
    • inboundControllerAdapter

      public static HttpControllerEndpointSpec inboundControllerAdapter(Expression viewExpression, String... path)
      Create an HttpControllerEndpointSpec builder for one-way adapter based on the provided SpEL expression and path array for mapping.
      Parameters:
      viewExpression - the SpEL expression to evaluate MVC view name to build in the end of request.
      path - the path mapping URIs (e.g. "/myPath.do").
      Returns:
      the HttpControllerEndpointSpec instance
    • inboundControllerGateway

      public static HttpControllerEndpointSpec inboundControllerGateway(String viewName, String... path)
      Create an HttpControllerEndpointSpec builder for request-reply gateway based on the provided MVC viewName and path array for mapping.
      Parameters:
      viewName - the MVC view name to build in the end of request.
      path - the path mapping URIs (e.g. "/myPath.do").
      Returns:
      the HttpControllerEndpointSpec instance
    • inboundControllerGateway

      public static HttpControllerEndpointSpec inboundControllerGateway(Expression viewExpression, String... path)
      Create an HttpControllerEndpointSpec builder for request-reply gateway based on the provided SpEL expression and path array for mapping.
      Parameters:
      viewExpression - the SpEL expression to evaluate MVC view name to build in the end of request.
      path - the path mapping URIs (e.g. "/myPath.do").
      Returns:
      the HttpControllerEndpointSpec instance
    • inboundChannelAdapter

      public static HttpRequestHandlerEndpointSpec inboundChannelAdapter(String... path)
      Create an HttpRequestHandlerEndpointSpec builder for one-way adapter based on the provided path array for mapping.
      Parameters:
      path - the path mapping URIs (e.g. "/myPath.do").
      Returns:
      the HttpRequestHandlerEndpointSpec instance
    • inboundGateway

      public static HttpRequestHandlerEndpointSpec inboundGateway(String... path)
      Create an HttpRequestHandlerEndpointSpec builder for request-reply gateway based on the provided path array for mapping.
      Parameters:
      path - the path mapping URIs (e.g. "/myPath.do").
      Returns:
      the HttpRequestHandlerEndpointSpec instance