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

public final class Http extends Object
The HTTP components Factory.
Since:
5.0
  • 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<org.springframework.messaging.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(org.springframework.expression.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 org.springframework.web.client.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 org.springframework.web.client.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<org.springframework.messaging.Message<P>,?> uriFunction, org.springframework.web.client.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(org.springframework.expression.Expression uriExpression, @Nullable org.springframework.web.client.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<org.springframework.messaging.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(org.springframework.expression.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 org.springframework.web.client.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 org.springframework.web.client.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<org.springframework.messaging.Message<P>,?> uriFunction, org.springframework.web.client.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(org.springframework.expression.Expression uriExpression, @Nullable org.springframework.web.client.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(org.springframework.expression.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(org.springframework.expression.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