public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpointSupportSpec<S,E>,E extends BaseHttpInboundEndpoint> extends MessagingGatewaySpec<S,E> implements ComponentsRegistration
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpInboundEndpointSupportSpec.CrossOriginSpec
A fluent API for the
CrossOrigin. |
static class |
HttpInboundEndpointSupportSpec.RequestMappingSpec
A fluent API for the
RequestMapping. |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,org.springframework.expression.Expression> |
headerExpressions |
protected HeaderMapper<org.springframework.http.HttpHeaders> |
headerMapper |
protected RequestMapping |
requestMapping |
logger, PARSER, target| Modifier | Constructor and Description |
|---|---|
protected |
HttpInboundEndpointSupportSpec(E gateway,
java.lang.String... path) |
| Modifier and Type | Method and Description |
|---|---|
S |
crossOrigin(java.util.function.Consumer<HttpInboundEndpointSupportSpec.CrossOriginSpec> crossOrigin)
|
S |
extractReplyPayload(boolean extractReplyPayload)
Specify whether only the reply Message's payload should be passed in the response.
|
java.util.Map<java.lang.Object,java.lang.String> |
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(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 |
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<HttpInboundEndpointSupportSpec.RequestMappingSpec> requestMapping)
Provide a
Consumer for configuring RequestMapping via HttpInboundEndpointSupportSpec.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 |
requestPayloadType(org.springframework.core.ResolvableType 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, requestTimeout, shouldTrack_this, afterPropertiesSet, destroy, doGet, get, getId, getObject, getObjectType, isSingletonprotected final RequestMapping requestMapping
protected final java.util.Map<java.lang.String,org.springframework.expression.Expression> headerExpressions
protected final HeaderMapper<org.springframework.http.HttpHeaders> headerMapper
protected HttpInboundEndpointSupportSpec(E gateway, java.lang.String... path)
public S requestMapping(java.util.function.Consumer<HttpInboundEndpointSupportSpec.RequestMappingSpec> requestMapping)
Consumer for configuring RequestMapping via HttpInboundEndpointSupportSpec.RequestMappingSpecrequestMapping - the Consumer to configure HttpInboundEndpointSupportSpec.RequestMappingSpec.RequestMappingpublic S crossOrigin(java.util.function.Consumer<HttpInboundEndpointSupportSpec.CrossOriginSpec> crossOrigin)
crossOrigin - the Consumer to configure HttpInboundEndpointSupportSpec.CrossOriginSpec.CrossOriginpublic S payloadExpression(java.lang.String payloadExpression)
payloadExpression - The payload expression.BaseHttpInboundEndpoint.setPayloadExpression(Expression)public S payloadExpression(org.springframework.expression.Expression payloadExpression)
payloadExpression - The payload expression.BaseHttpInboundEndpoint.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.BaseHttpInboundEndpoint.setPayloadExpression(Expression)public S headerExpressions(java.util.Map<java.lang.String,org.springframework.expression.Expression> headerExpressions)
headerExpressions - The Map of SpEL expressions for headers.BaseHttpInboundEndpoint.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.BaseHttpInboundEndpoint.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.BaseHttpInboundEndpoint.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.BaseHttpInboundEndpoint.setHeaderExpressions(Map)public S headerMapper(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 requestPayloadType(org.springframework.core.ResolvableType 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 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.BaseHttpInboundEndpoint.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.BaseHttpInboundEndpoint.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.BaseHttpInboundEndpoint.setStatusCodeExpression(Expression)public java.util.Map<java.lang.Object,java.lang.String> getComponentsToRegister()
getComponentsToRegister in interface ComponentsRegistration