S - the target BaseHttpInboundEndpointSpec implementation type.E - the target HttpRequestHandlingEndpointSupport implementation type.public abstract class BaseHttpInboundEndpointSpec<S extends BaseHttpInboundEndpointSpec<S,E>,E extends HttpRequestHandlingEndpointSupport>
extends org.springframework.integration.dsl.MessagingGatewaySpec<S,E>
implements org.springframework.integration.dsl.ComponentsRegistration
MessagingGatewaySpec for the HttpRequestHandlingEndpointSupport implementations.| Modifier and Type | Class and Description |
|---|---|
static class |
BaseHttpInboundEndpointSpec.CrossOriginSpec
A fluent API for the
CrossOrigin. |
static class |
BaseHttpInboundEndpointSpec.RequestMappingSpec
A fluent API for the
RequestMapping. |
| Modifier and Type | Method and Description |
|---|---|
S |
crossOrigin(java.util.function.Consumer<BaseHttpInboundEndpointSpec.CrossOriginSpec> crossOrigin)
|
S |
extractReplyPayload(boolean extractReplyPayload)
Specify whether only the reply Message's payload should be passed in the response.
|
java.util.Collection<java.lang.Object> |
getComponentsToRegister() |
S |
headerExpression(java.lang.String header,
org.springframework.expression.Expression expression)
Specify SpEL expression for provided header to populate.
|
S |
headerExpression(java.lang.String header,
java.lang.String expression)
Specify SpEL expression for provided header to populate.
|
S |
headerExpressions(java.util.Map<java.lang.String,org.springframework.expression.Expression> headerExpressions)
Specify a Map of SpEL expressions to evaluate in order to generate the Message headers.
|
<P> S |
headerFunction(java.lang.String header,
java.util.function.Function<org.springframework.http.HttpEntity<P>,?> headerFunction)
Specify a
Function for provided header to populate. |
S |
headerMapper(org.springframework.integration.mapping.HeaderMapper<org.springframework.http.HttpHeaders> headerMapper)
Set the
HeaderMapper to use when mapping between HTTP headers and MessageHeaders. |
S |
mappedRequestHeaders(java.lang.String... patterns)
Provide the pattern array for request headers to map.
|
S |
mappedResponseHeaders(java.lang.String... patterns)
Provide the pattern array for response headers to map.
|
S |
mergeWithDefaultConverters(boolean mergeWithDefaultConverters)
Flag which determines if the default converters should be available after custom converters.
|
S |
messageConverters(org.springframework.http.converter.HttpMessageConverter<?>... messageConverters)
Set the message body converters to use.
|
S |
multipartResolver(org.springframework.web.multipart.MultipartResolver multipartResolver)
Specify the
MultipartResolver to use when checking requests. |
S |
payloadExpression(org.springframework.expression.Expression payloadExpression)
Specify a SpEL expression to evaluate in order to generate the Message payload.
|
S |
payloadExpression(java.lang.String payloadExpression)
Specify a SpEL expression to evaluate in order to generate the Message payload.
|
<P> S |
payloadFunction(java.util.function.Function<org.springframework.http.HttpEntity<P>,?> payloadFunction)
Specify a
Function to evaluate in order to generate the Message payload. |
S |
requestMapping(java.util.function.Consumer<BaseHttpInboundEndpointSpec.RequestMappingSpec> requestMapping)
Provide a
Consumer for configuring RequestMapping via BaseHttpInboundEndpointSpec.RequestMappingSpec |
S |
requestPayloadType(java.lang.Class<?> requestPayloadType)
Specify the type of payload to be generated when the inbound HTTP request content is read by the
HttpMessageConverters. |
S |
statusCodeExpression(org.springframework.expression.Expression statusCodeExpression)
Specify the
Expression to resolve a status code for Response to override
the default '200 OK' or '500 Internal Server Error' for a timeout. |
S |
statusCodeExpression(java.lang.String statusCodeExpression)
Specify the
Expression to resolve a status code for Response to override
the default '200 OK' or '500 Internal Server Error' for a timeout. |
S |
statusCodeFunction(java.util.function.Function<java.lang.Void,?> statusCodeFunction)
Specify the
Function to resolve a status code for Response to override
the default '200 OK' or '500 Internal Server Error' for a timeout. |
autoStartup, errorChannel, errorChannel, id, phase, replyChannel, replyChannel, replyMapper, replyTimeout, requestChannel, requestChannel, requestMapper, requestTimeoutpublic S requestMapping(java.util.function.Consumer<BaseHttpInboundEndpointSpec.RequestMappingSpec> requestMapping)
Consumer for configuring RequestMapping via BaseHttpInboundEndpointSpec.RequestMappingSpecrequestMapping - the Consumer to configure BaseHttpInboundEndpointSpec.RequestMappingSpec.RequestMappingpublic S crossOrigin(java.util.function.Consumer<BaseHttpInboundEndpointSpec.CrossOriginSpec> crossOrigin)
crossOrigin - the Consumer to configure BaseHttpInboundEndpointSpec.CrossOriginSpec.CrossOriginpublic S payloadExpression(java.lang.String payloadExpression)
payloadExpression - The payload expression.HttpRequestHandlingEndpointSupport.setPayloadExpression(Expression)public S payloadExpression(org.springframework.expression.Expression payloadExpression)
payloadExpression - The payload expression.HttpRequestHandlingEndpointSupport.setPayloadExpression(Expression)public <P> S payloadFunction(java.util.function.Function<org.springframework.http.HttpEntity<P>,?> payloadFunction)
Function to evaluate in order to generate the Message payload.P - the expected HTTP request body type.payloadFunction - The payload Function.HttpRequestHandlingEndpointSupport.setPayloadExpression(Expression)public S headerExpressions(java.util.Map<java.lang.String,org.springframework.expression.Expression> headerExpressions)
headerExpressions - The Map of SpEL expressions for headers.HttpRequestHandlingEndpointSupport.setHeaderExpressions(Map)public S headerExpression(java.lang.String header, java.lang.String expression)
header - the header name to populate.expression - the SpEL expression for the header.HttpRequestHandlingEndpointSupport.setHeaderExpressions(Map)public S headerExpression(java.lang.String header, org.springframework.expression.Expression expression)
header - the header name to populate.expression - the SpEL expression for the header.HttpRequestHandlingEndpointSupport.setHeaderExpressions(Map)public <P> S headerFunction(java.lang.String header, java.util.function.Function<org.springframework.http.HttpEntity<P>,?> headerFunction)
Function for provided header to populate.P - the expected HTTP body type.header - the header name to add.headerFunction - the function to evaluate the header value against HttpEntity.HttpRequestHandlingEndpointSupport.setHeaderExpressions(Map)public S messageConverters(org.springframework.http.converter.HttpMessageConverter<?>... messageConverters)
messageConverters - The message converters.public S mergeWithDefaultConverters(boolean mergeWithDefaultConverters)
mergeWithDefaultConverters - true to merge, false to replace.public S headerMapper(org.springframework.integration.mapping.HeaderMapper<org.springframework.http.HttpHeaders> headerMapper)
HeaderMapper to use when mapping between HTTP headers and MessageHeaders.headerMapper - The header mapper.public S mappedRequestHeaders(java.lang.String... patterns)
patterns - the patterns for request headers to map.DefaultHttpHeaderMapper.setOutboundHeaderNames(String[])public S mappedResponseHeaders(java.lang.String... patterns)
patterns - the patterns for response headers to map.DefaultHttpHeaderMapper.setInboundHeaderNames(String[])public S requestPayloadType(java.lang.Class<?> requestPayloadType)
HttpMessageConverters.
By default this value is null which means at runtime any "text" Content-Type will
result in String while all others default to byte[].class.requestPayloadType - The payload type.public S extractReplyPayload(boolean extractReplyPayload)
false, the entire Message will be used to generate the response.
The default is true.extractReplyPayload - true to extract the reply payload.public S multipartResolver(org.springframework.web.multipart.MultipartResolver multipartResolver)
MultipartResolver to use when checking requests.multipartResolver - The multipart resolver.public S statusCodeExpression(java.lang.String statusCodeExpression)
Expression to resolve a status code for Response to override
the default '200 OK' or '500 Internal Server Error' for a timeout.statusCodeExpression - The status code Expression.HttpRequestHandlingEndpointSupport.setStatusCodeExpression(Expression)public S statusCodeExpression(org.springframework.expression.Expression statusCodeExpression)
Expression to resolve a status code for Response to override
the default '200 OK' or '500 Internal Server Error' for a timeout.statusCodeExpression - The status code Expression.HttpRequestHandlingEndpointSupport.setStatusCodeExpression(Expression)public S statusCodeFunction(java.util.function.Function<java.lang.Void,?> statusCodeFunction)
Function to resolve a status code for Response to override
the default '200 OK' or '500 Internal Server Error' for a timeout.statusCodeFunction - The status code Function.HttpRequestHandlingEndpointSupport.setStatusCodeExpression(Expression)public java.util.Collection<java.lang.Object> getComponentsToRegister()
getComponentsToRegister in interface org.springframework.integration.dsl.ComponentsRegistration