Class Http
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 Summary
Modifier and Type Method Description static HttpRequestHandlerEndpointSpec
inboundChannelAdapter(String... path)
Create anHttpRequestHandlerEndpointSpec
builder for one-way adapter based on the providedpath
array for mapping.static HttpControllerEndpointSpec
inboundControllerAdapter(String viewName, String... path)
Create anHttpControllerEndpointSpec
builder for one-way adapter based on the provided MVCviewName
andpath
array for mapping.static HttpControllerEndpointSpec
inboundControllerAdapter(Expression viewExpression, String... path)
Create anHttpControllerEndpointSpec
builder for one-way adapter based on the provided SpEL expression andpath
array for mapping.static HttpControllerEndpointSpec
inboundControllerGateway(String viewName, String... path)
Create anHttpControllerEndpointSpec
builder for request-reply gateway based on the provided MVCviewName
andpath
array for mapping.static HttpControllerEndpointSpec
inboundControllerGateway(Expression viewExpression, String... path)
Create anHttpControllerEndpointSpec
builder for request-reply gateway based on the provided SpEL expression andpath
array for mapping.static HttpRequestHandlerEndpointSpec
inboundGateway(String... path)
Create anHttpRequestHandlerEndpointSpec
builder for request-reply gateway based on the providedpath
array for mapping.static HttpMessageHandlerSpec
outboundChannelAdapter(String uri)
Create anHttpMessageHandlerSpec
builder for one-way adapter based on provideduri
.static HttpMessageHandlerSpec
outboundChannelAdapter(String uri, RestTemplate restTemplate)
Create anHttpMessageHandlerSpec
builder for one-way adapter based on provideduri
andRestTemplate
.static HttpMessageHandlerSpec
outboundChannelAdapter(URI uri)
Create anHttpMessageHandlerSpec
builder for one-way adapter based on providedURI
.static HttpMessageHandlerSpec
outboundChannelAdapter(URI uri, RestTemplate restTemplate)
Create anHttpMessageHandlerSpec
builder for one-way adapter based on providedURI
andRestTemplate
.static <P> HttpMessageHandlerSpec
outboundChannelAdapter(Function<Message<P>,?> uriFunction)
Create anHttpMessageHandlerSpec
builder for one-way adapter based on providedFunction
to evaluate targeturi
against request message.static <P> HttpMessageHandlerSpec
outboundChannelAdapter(Function<Message<P>,?> uriFunction, RestTemplate restTemplate)
Create anHttpMessageHandlerSpec
builder for one-way adapter based on providedFunction
to evaluate targeturi
against request message andRestTemplate
for HTTP exchanges.static HttpMessageHandlerSpec
outboundChannelAdapter(Expression uriExpression)
Create anHttpMessageHandlerSpec
builder for one-way adapter based on provided SpELExpression
to evaluate targeturi
against request message.static HttpMessageHandlerSpec
outboundChannelAdapter(Expression uriExpression, RestTemplate restTemplate)
Create anHttpMessageHandlerSpec
builder for one-way adapter based on provided SpELExpression
to evaluate targeturi
against request message andRestTemplate
for HTTP exchanges.static HttpMessageHandlerSpec
outboundGateway(String uri)
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on provideduri
.static HttpMessageHandlerSpec
outboundGateway(String uri, RestTemplate restTemplate)
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on provideduri
andRestTemplate
.static HttpMessageHandlerSpec
outboundGateway(URI uri)
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on providedURI
.static HttpMessageHandlerSpec
outboundGateway(URI uri, RestTemplate restTemplate)
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on providedURI
andRestTemplate
.static <P> HttpMessageHandlerSpec
outboundGateway(Function<Message<P>,?> uriFunction)
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on providedFunction
to evaluate targeturi
against request message.static <P> HttpMessageHandlerSpec
outboundGateway(Function<Message<P>,?> uriFunction, RestTemplate restTemplate)
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on providedFunction
to evaluate targeturi
against request message andRestTemplate
for HTTP exchanges.static HttpMessageHandlerSpec
outboundGateway(Expression uriExpression)
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on provided SpELExpression
to evaluate targeturi
against request message.static HttpMessageHandlerSpec
outboundGateway(Expression uriExpression, RestTemplate restTemplate)
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on provided SpELExpression
to evaluate targeturi
against request message andRestTemplate
for HTTP exchanges.
-
Method Details
-
outboundChannelAdapter
Create anHttpMessageHandlerSpec
builder for one-way adapter based on providedURI
.- Parameters:
uri
- theURI
to send requests.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundChannelAdapter
Create anHttpMessageHandlerSpec
builder for one-way adapter based on provideduri
.- Parameters:
uri
- theuri
to send requests.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundChannelAdapter
public static <P> HttpMessageHandlerSpec outboundChannelAdapter(Function<Message<P>,?> uriFunction)Create anHttpMessageHandlerSpec
builder for one-way adapter based on providedFunction
to evaluate targeturi
against request message.- Type Parameters:
P
- the expected payload type.- Parameters:
uriFunction
- theFunction
to evaluateuri
at runtime.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundChannelAdapter
Create anHttpMessageHandlerSpec
builder for one-way adapter based on provided SpELExpression
to evaluate targeturi
against request message.- Parameters:
uriExpression
- the SpELExpression
to evaluateuri
at runtime.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundChannelAdapter
Create anHttpMessageHandlerSpec
builder for one-way adapter based on providedURI
andRestTemplate
.- Parameters:
uri
- theURI
to send requests.restTemplate
-RestTemplate
to use.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundChannelAdapter
Create anHttpMessageHandlerSpec
builder for one-way adapter based on provideduri
andRestTemplate
.- Parameters:
uri
- theuri
to send requests.restTemplate
-RestTemplate
to use.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundChannelAdapter
public static <P> HttpMessageHandlerSpec outboundChannelAdapter(Function<Message<P>,?> uriFunction, RestTemplate restTemplate)Create anHttpMessageHandlerSpec
builder for one-way adapter based on providedFunction
to evaluate targeturi
against request message andRestTemplate
for HTTP exchanges.- Type Parameters:
P
- the expected payload type.- Parameters:
uriFunction
- theFunction
to evaluateuri
at runtime.restTemplate
-RestTemplate
to use.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundChannelAdapter
public static HttpMessageHandlerSpec outboundChannelAdapter(Expression uriExpression, RestTemplate restTemplate)Create anHttpMessageHandlerSpec
builder for one-way adapter based on provided SpELExpression
to evaluate targeturi
against request message andRestTemplate
for HTTP exchanges.- Parameters:
uriExpression
- the SpELExpression
to evaluateuri
at runtime.restTemplate
-RestTemplate
to use.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundGateway
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on providedURI
.- Parameters:
uri
- theURI
to send requests.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundGateway
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on provideduri
.- Parameters:
uri
- theuri
to send requests.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundGateway
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on providedFunction
to evaluate targeturi
against request message.- Type Parameters:
P
- the expected payload type.- Parameters:
uriFunction
- theFunction
to evaluateuri
at runtime.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundGateway
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on provided SpELExpression
to evaluate targeturi
against request message.- Parameters:
uriExpression
- the SpELExpression
to evaluateuri
at runtime.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundGateway
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on providedURI
andRestTemplate
.- Parameters:
uri
- theURI
to send requests.restTemplate
-RestTemplate
to use.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundGateway
Create anHttpMessageHandlerSpec
builder for request-reply gateway based on provideduri
andRestTemplate
.- Parameters:
uri
- theuri
to send requests.restTemplate
-RestTemplate
to use.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundGateway
public static <P> HttpMessageHandlerSpec outboundGateway(Function<Message<P>,?> uriFunction, RestTemplate restTemplate)Create anHttpMessageHandlerSpec
builder for request-reply gateway based on providedFunction
to evaluate targeturi
against request message andRestTemplate
for HTTP exchanges.- Type Parameters:
P
- the expected payload type.- Parameters:
uriFunction
- theFunction
to evaluateuri
at runtime.restTemplate
-RestTemplate
to use.- Returns:
- the HttpMessageHandlerSpec instance
-
outboundGateway
public static HttpMessageHandlerSpec outboundGateway(Expression uriExpression, RestTemplate restTemplate)Create anHttpMessageHandlerSpec
builder for request-reply gateway based on provided SpELExpression
to evaluate targeturi
against request message andRestTemplate
for HTTP exchanges.- Parameters:
uriExpression
- the SpELExpression
to evaluateuri
at runtime.restTemplate
-RestTemplate
to use.- Returns:
- the HttpMessageHandlerSpec instance
-
inboundControllerAdapter
Create anHttpControllerEndpointSpec
builder for one-way adapter based on the provided MVCviewName
andpath
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 anHttpControllerEndpointSpec
builder for one-way adapter based on the provided SpEL expression andpath
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
Create anHttpControllerEndpointSpec
builder for request-reply gateway based on the provided MVCviewName
andpath
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 anHttpControllerEndpointSpec
builder for request-reply gateway based on the provided SpEL expression andpath
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
Create anHttpRequestHandlerEndpointSpec
builder for one-way adapter based on the providedpath
array for mapping.- Parameters:
path
- the path mapping URIs (e.g. "/myPath.do").- Returns:
- the HttpRequestHandlerEndpointSpec instance
-
inboundGateway
Create anHttpRequestHandlerEndpointSpec
builder for request-reply gateway based on the providedpath
array for mapping.- Parameters:
path
- the path mapping URIs (e.g. "/myPath.do").- Returns:
- the HttpRequestHandlerEndpointSpec instance
-