Class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpointSupportSpec<S,E>,E extends BaseHttpInboundEndpoint>
java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,G>
org.springframework.integration.dsl.MessagingGatewaySpec<S,E>
org.springframework.integration.http.dsl.HttpInboundEndpointSupportSpec<S,E>
- Type Parameters:
S
- the target spec extension type.E
- the target endpoint type.
- All Implemented Interfaces:
DisposableBean
,FactoryBean<E>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
- Direct Known Subclasses:
BaseHttpInboundEndpointSpec
,WebFluxInboundEndpointSpec
public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpointSupportSpec<S,E>,E extends BaseHttpInboundEndpoint>
extends MessagingGatewaySpec<S,E>
implements ComponentsRegistration
- Since:
- 5.0
- Author:
- Artem Bilan, Gary Russell
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent API for theCrossOrigin
.static final class
A fluent API for theRequestMapping
. -
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<String,
Expression> protected final HeaderMapper<HttpHeaders>
protected final RequestMapping
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, target
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
ModifierConstructorDescriptionprotected
HttpInboundEndpointSupportSpec
(E gateway, String... path) -
Method Summary
Modifier and TypeMethodDescriptionextractReplyPayload
(boolean extractReplyPayload) Specify whether only the reply Message's payload should be passed in the response.headerExpression
(String header, String expression) Specify SpEL expression for provided header to populate.headerExpression
(String header, Expression expression) Specify SpEL expression for provided header to populate.headerExpressions
(Map<String, Expression> expressions) Specify a Map of SpEL expressions to evaluate in order to generate the Message headers.<P> S
headerFunction
(String header, Function<HttpEntity<P>, ?> headerFunction) Specify aFunction
for provided header to populate.headerMapper
(HeaderMapper<HttpHeaders> mapper) Set theHeaderMapper
to use when mapping between HTTP headers and MessageHeaders.mappedRequestHeaders
(String... patterns) Provide the pattern array for request headers to map.mappedResponseHeaders
(String... patterns) Provide the pattern array for response headers to map.payloadExpression
(String payloadExpression) Specify a SpEL expression to evaluate in order to generate the Message payload.payloadExpression
(Expression payloadExpression) Specify a SpEL expression to evaluate in order to generate the Message payload.<P> S
payloadFunction
(Function<HttpEntity<P>, ?> payloadFunction) Specify aFunction
to evaluate in order to generate the Message payload.Provide aConsumer
for configuringRequestMapping
viaHttpInboundEndpointSupportSpec.RequestMappingSpec
.requestPayloadType
(Class<?> requestPayloadType) Specify the type of payload to be generated when the inbound HTTP request content is read by theHttpMessageConverter
s.requestPayloadType
(ResolvableType requestPayloadType) Specify the type of payload to be generated when the inbound HTTP request content is read by theHttpMessageConverter
s.statusCodeExpression
(String statusCodeExpression) Specify theExpression
to resolve a status code for Response to override the default '200 OK' or '500 Internal Server Error' for a timeout.statusCodeExpression
(Expression statusCodeExpression) Specify theExpression
to resolve a status code for Response to override the default '200 OK' or '500 Internal Server Error' for a timeout.statusCodeFunction
(Function<RequestEntity<?>, ?> statusCodeFunction) Specify theFunction
to resolve a status code for Response to override the default '200 OK' or '500 Internal Server Error' for a timeout.Specify aValidator
to validate a converted payload from request.Methods inherited from class org.springframework.integration.dsl.MessagingGatewaySpec
autoStartup, errorChannel, errorChannel, errorOnTimeout, id, phase, replyChannel, replyChannel, replyMapper, replyTimeout, requestChannel, requestChannel, requestMapper, requestTimeout, shouldTrack
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Field Details
-
requestMapping
-
headerExpressions
-
headerMapper
-
-
Constructor Details
-
HttpInboundEndpointSupportSpec
-
-
Method Details
-
requestMapping
Provide aConsumer
for configuringRequestMapping
viaHttpInboundEndpointSupportSpec.RequestMappingSpec
.- Parameters:
mapping
- theConsumer
to configureHttpInboundEndpointSupportSpec.RequestMappingSpec
.- Returns:
- the spec
- See Also:
-
crossOrigin
- Parameters:
crossOrigin
- theConsumer
to configureHttpInboundEndpointSupportSpec.CrossOriginSpec
.- Returns:
- the spec
- See Also:
-
payloadExpression
Specify a SpEL expression to evaluate in order to generate the Message payload.- Parameters:
payloadExpression
- The payload expression.- Returns:
- the spec
- See Also:
-
payloadExpression
Specify a SpEL expression to evaluate in order to generate the Message payload.- Parameters:
payloadExpression
- The payload expression.- Returns:
- the spec
- See Also:
-
payloadFunction
Specify aFunction
to evaluate in order to generate the Message payload.- Type Parameters:
P
- the expected HTTP request body type.- Parameters:
payloadFunction
- The payloadFunction
.- Returns:
- the spec
- See Also:
-
headerExpressions
Specify a Map of SpEL expressions to evaluate in order to generate the Message headers.- Parameters:
expressions
- TheMap
of SpEL expressions for headers.- Returns:
- the spec
- See Also:
-
headerExpression
Specify SpEL expression for provided header to populate.- Parameters:
header
- the header name to populate.expression
- the SpEL expression for the header.- Returns:
- the spec
- See Also:
-
headerExpression
Specify SpEL expression for provided header to populate.- Parameters:
header
- the header name to populate.expression
- the SpEL expression for the header.- Returns:
- the spec
- See Also:
-
headerFunction
Specify aFunction
for provided header to populate.- Type Parameters:
P
- the expected HTTP body type.- Parameters:
header
- the header name to add.headerFunction
- the function to evaluate the header value againstHttpEntity
.- Returns:
- the current Spec.
- See Also:
-
headerMapper
Set theHeaderMapper
to use when mapping between HTTP headers and MessageHeaders.- Parameters:
mapper
- The header mapper.- Returns:
- the current Spec.
-
mappedRequestHeaders
Provide the pattern array for request headers to map.- Parameters:
patterns
- the patterns for request headers to map.- Returns:
- the current Spec.
- See Also:
-
mappedResponseHeaders
Provide the pattern array for response headers to map.- Parameters:
patterns
- the patterns for response headers to map.- Returns:
- the current Spec.
- See Also:
-
requestPayloadType
Specify the type of payload to be generated when the inbound HTTP request content is read by theHttpMessageConverter
s. By default, this value is null which means at runtime any "text" Content-Type will result in String while all others default tobyte[].class
.- Parameters:
requestPayloadType
- The payload type.- Returns:
- the current Spec.
-
requestPayloadType
Specify the type of payload to be generated when the inbound HTTP request content is read by theHttpMessageConverter
s. By default, this value is null which means at runtime any "text" Content-Type will result in String while all others default tobyte[].class
.- Parameters:
requestPayloadType
- The payload type.- Returns:
- the current Spec.
-
extractReplyPayload
Specify whether only the reply Message's payload should be passed in the response. If this is set tofalse
, the entire Message will be used to generate the response. The default istrue
.- Parameters:
extractReplyPayload
- true to extract the reply payload.- Returns:
- the current Spec.
-
statusCodeExpression
Specify theExpression
to resolve a status code for Response to override the default '200 OK' or '500 Internal Server Error' for a timeout.- Parameters:
statusCodeExpression
- The status code Expression.- Returns:
- the current Spec.
- See Also:
-
statusCodeExpression
Specify theExpression
to resolve a status code for Response to override the default '200 OK' or '500 Internal Server Error' for a timeout.- Parameters:
statusCodeExpression
- The status code Expression.- Returns:
- the current Spec.
- See Also:
-
statusCodeFunction
Specify theFunction
to resolve a status code for Response to override the default '200 OK' or '500 Internal Server Error' for a timeout.- Parameters:
statusCodeFunction
- The status codeFunction
.- Returns:
- the current Spec.
- See Also:
-
validator
Specify aValidator
to validate a converted payload from request.- Parameters:
validator
- theValidator
to use.- Returns:
- the spec
- Since:
- 5.2
-
getComponentsToRegister
- Specified by:
getComponentsToRegister
in interfaceComponentsRegistration
-