Class WebFluxMessageHandlerSpec
java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<S,E>
org.springframework.integration.http.dsl.BaseHttpMessageHandlerSpec<WebFluxMessageHandlerSpec,WebFluxRequestExecutingMessageHandler>
org.springframework.integration.webflux.dsl.WebFluxMessageHandlerSpec
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,DisposableBean
,FactoryBean<WebFluxRequestExecutingMessageHandler>
,InitializingBean
,Lifecycle
,Phased
,SmartLifecycle
,ComponentsRegistration
public class WebFluxMessageHandlerSpec
extends BaseHttpMessageHandlerSpec<WebFluxMessageHandlerSpec,WebFluxRequestExecutingMessageHandler>
The
BaseHttpMessageHandlerSpec
implementation for the WebFluxRequestExecutingMessageHandler
.- Since:
- 5.0
- Author:
- Shiliang Li, Artem Bilan, Abhijit Sarkar, Gary Russell
- See Also:
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
logger
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
WebFluxMessageHandlerSpec
(String uri, WebClient webClient) protected
WebFluxMessageHandlerSpec
(URI uri, WebClient webClient) protected
WebFluxMessageHandlerSpec
(Expression uriExpression, WebClient webClient) -
Method Summary
Modifier and TypeMethodDescriptionbodyExtractor
(BodyExtractor<?, ? super ClientHttpResponse> bodyExtractor) Specify aBodyExtractor
as an alternative to theexpectedResponseType
to allow to get low-level access to the receivedClientHttpResponse
.protected WebFluxMessageHandlerSpec
expectReply
(boolean expectReply) protected boolean
publisherElementType
(Class<?> publisherElementType) Configure a type for a requestPublisher
elements.publisherElementType
(ParameterizedTypeReference<?> publisherElementType) Configure aParameterizedTypeReference
for a requestPublisher
elements.publisherElementTypeExpression
(Expression publisherElementTypeExpression) Configure a SpEL expression to evaluate a requestPublisher
elements type at runtime against a request message.publisherElementTypeFunction
(Function<Message<P>, ?> typeFunction) Configure aFunction
to evaluate a requestPublisher
elements type at runtime against a request message.replyPayloadToFlux
(boolean replyPayloadToFlux) The boolean flag to identify if the reply payload should be as aFlux
from the response body or as resolved value from theMono
of the response body.Methods inherited from class org.springframework.integration.http.dsl.BaseHttpMessageHandlerSpec
charset, encodingMode, expectedResponseType, expectedResponseType, expectedResponseTypeExpression, expectedResponseTypeFunction, extractPayload, extractResponseBody, getComponentsToRegister, headerMapper, httpMethod, httpMethodExpression, httpMethodFunction, mappedRequestHeaders, mappedResponseHeaders, transferCookies, uriVariable, uriVariable, uriVariable, uriVariableExpressions, uriVariablesExpression, uriVariablesExpression, uriVariablesFunction
Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
-
Field Details
-
webClient
-
-
Constructor Details
-
WebFluxMessageHandlerSpec
-
WebFluxMessageHandlerSpec
-
WebFluxMessageHandlerSpec
-
-
Method Details
-
replyPayloadToFlux
The boolean flag to identify if the reply payload should be as aFlux
from the response body or as resolved value from theMono
of the response body. Defaults tofalse
- simple value is pushed downstream. Makes sense whenexpectedResponseType
is configured.- Parameters:
replyPayloadToFlux
- represent reply payload as aFlux
or as a value from theMono
.- Returns:
- the spec
- Since:
- 5.0.1
- See Also:
-
bodyExtractor
public WebFluxMessageHandlerSpec bodyExtractor(BodyExtractor<?, ? super ClientHttpResponse> bodyExtractor) Specify aBodyExtractor
as an alternative to theexpectedResponseType
to allow to get low-level access to the receivedClientHttpResponse
.- Parameters:
bodyExtractor
- theBodyExtractor
to use.- Returns:
- the spec
- Since:
- 5.0.1
- See Also:
-
publisherElementType
Configure a type for a requestPublisher
elements.- Parameters:
publisherElementType
- the type of the requestPublisher
elements.- Returns:
- the spec
- Since:
- 5.2
- See Also:
-
publisherElementType
public WebFluxMessageHandlerSpec publisherElementType(ParameterizedTypeReference<?> publisherElementType) Configure aParameterizedTypeReference
for a requestPublisher
elements.- Parameters:
publisherElementType
- the type of the requestPublisher
elements.- Returns:
- the spec
- Since:
- 5.2
- See Also:
-
publisherElementTypeFunction
public <P> WebFluxMessageHandlerSpec publisherElementTypeFunction(Function<Message<P>, ?> typeFunction) Configure aFunction
to evaluate a requestPublisher
elements type at runtime against a request message.- Type Parameters:
P
- the expected payload type.- Parameters:
typeFunction
- theFunction
to evaluate a type for the requestPublisher
elements.- Returns:
- the spec
- Since:
- 5.2
- See Also:
-
publisherElementTypeExpression
public WebFluxMessageHandlerSpec publisherElementTypeExpression(Expression publisherElementTypeExpression) Configure a SpEL expression to evaluate a requestPublisher
elements type at runtime against a request message.- Parameters:
publisherElementTypeExpression
- the expression to evaluate a type for the requestPublisher
elements.- Returns:
- the spec
- Since:
- 5.2
- See Also:
-
isClientSet
protected boolean isClientSet()- Specified by:
isClientSet
in classBaseHttpMessageHandlerSpec<WebFluxMessageHandlerSpec,
WebFluxRequestExecutingMessageHandler>
-
expectReply
-