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 MessagingGatewaySpec<S,E> implements 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. |
logger, PARSER, target| 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.
|
Collection<Object> |
getComponentsToRegister() |
S |
headerExpression(String header,
Expression expression)
Specify SpEL expression for provided header to populate.
|
S |
headerExpression(String header,
String expression)
Specify SpEL expression for provided header to populate.
|
S |
headerExpressions(Map<String,Expression> headerExpressions)
Specify a Map of SpEL expressions to evaluate in order to generate the Message headers.
|
<P> S |
headerFunction(String header,
java.util.function.Function<HttpEntity<P>,?> headerFunction)
Specify a
Function for provided header to populate. |
S |
headerMapper(HeaderMapper<HttpHeaders> headerMapper)
Set the
HeaderMapper to use when mapping between HTTP headers and MessageHeaders. |
S |
mappedRequestHeaders(String... patterns)
Provide the pattern array for request headers to map.
|
S |
mappedResponseHeaders(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(HttpMessageConverter<?>... messageConverters)
Set the message body converters to use.
|
S |
multipartResolver(MultipartResolver multipartResolver)
Specify the
MultipartResolver to use when checking requests. |
S |
payloadExpression(Expression payloadExpression)
Specify a SpEL expression to evaluate in order to generate the Message payload.
|
S |
payloadExpression(String payloadExpression)
Specify a SpEL expression to evaluate in order to generate the Message payload.
|
<P> S |
payloadFunction(java.util.function.Function<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(Class<?> requestPayloadType)
Specify the type of payload to be generated when the inbound HTTP request content is read by the
HttpMessageConverters. |
S |
statusCodeExpression(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(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<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, requestTimeout_this, doGet, get, getId, getObject, getObjectType, isSingletonpublic 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(String payloadExpression)
payloadExpression - The payload expression.HttpRequestHandlingEndpointSupport.setPayloadExpression(Expression)public S payloadExpression(Expression payloadExpression)
payloadExpression - The payload expression.HttpRequestHandlingEndpointSupport.setPayloadExpression(Expression)public <P> S payloadFunction(java.util.function.Function<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(Map<String,Expression> headerExpressions)
headerExpressions - The Map of SpEL expressions for headers.HttpRequestHandlingEndpointSupport.setHeaderExpressions(Map)public S headerExpression(String header, String expression)
header - the header name to populate.expression - the SpEL expression for the header.HttpRequestHandlingEndpointSupport.setHeaderExpressions(Map)public S headerExpression(String header, Expression expression)
header - the header name to populate.expression - the SpEL expression for the header.HttpRequestHandlingEndpointSupport.setHeaderExpressions(Map)public <P> S headerFunction(String header, java.util.function.Function<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(HttpMessageConverter<?>... messageConverters)
messageConverters - The message converters.public S mergeWithDefaultConverters(boolean mergeWithDefaultConverters)
mergeWithDefaultConverters - true to merge, false to replace.public S headerMapper(HeaderMapper<HttpHeaders> headerMapper)
HeaderMapper to use when mapping between HTTP headers and MessageHeaders.headerMapper - The header mapper.public S mappedRequestHeaders(String... patterns)
patterns - the patterns for request headers to map.DefaultHttpHeaderMapper.setOutboundHeaderNames(String[])public S mappedResponseHeaders(String... patterns)
patterns - the patterns for response headers to map.DefaultHttpHeaderMapper.setInboundHeaderNames(String[])public S requestPayloadType(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(MultipartResolver multipartResolver)
MultipartResolver to use when checking requests.multipartResolver - The multipart resolver.public S statusCodeExpression(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(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<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 Collection<Object> getComponentsToRegister()
getComponentsToRegister in interface ComponentsRegistration