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:
WebFluxRequestExecutingMessageHandler
-
Field Summary
Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
PARSER, target
-
Constructor Summary
Constructors Modifier Constructor Description protected
WebFluxMessageHandlerSpec(String uri, WebClient webClient)
protected
WebFluxMessageHandlerSpec(URI uri, WebClient webClient)
protected
WebFluxMessageHandlerSpec(Expression uriExpression, WebClient webClient)
-
Method Summary
Modifier and Type Method Description WebFluxMessageHandlerSpec
bodyExtractor(BodyExtractor<?,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
isClientSet()
WebFluxMessageHandlerSpec
publisherElementType(Class<?> publisherElementType)
Configure a type for a requestPublisher
elements.WebFluxMessageHandlerSpec
publisherElementType(ParameterizedTypeReference<?> publisherElementType)
Configure aParameterizedTypeReference
for a requestPublisher
elements.WebFluxMessageHandlerSpec
publisherElementTypeExpression(Expression publisherElementTypeExpression)
Configure a SpEL expression to evaluate a requestPublisher
elements type at runtime against a request message.<P> WebFluxMessageHandlerSpec
publisherElementTypeFunction(Function<Message<P>,?> typeFunction)
Configure aFunction
to evaluate a requestPublisher
elements type at runtime against a request message.WebFluxMessageHandlerSpec
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
-
Constructor Details
-
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:
WebFluxRequestExecutingMessageHandler.setReplyPayloadToFlux(boolean)
-
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:
WebFluxRequestExecutingMessageHandler.setBodyExtractor(BodyExtractor)
-
publisherElementType
Configure a type for a requestPublisher
elements.- Parameters:
publisherElementType
- the type of the requestPublisher
elements.- Returns:
- the spec
- Since:
- 5.2
- See Also:
WebFluxRequestExecutingMessageHandler.setPublisherElementType(java.lang.Class<?>)
-
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:
WebFluxRequestExecutingMessageHandler.setPublisherElementType(java.lang.Class<?>)
-
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:
WebFluxRequestExecutingMessageHandler.setPublisherElementTypeExpression(Expression)
-
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:
WebFluxRequestExecutingMessageHandler.setPublisherElementTypeExpression(Expression)
-
isClientSet
protected boolean isClientSet()- Specified by:
isClientSet
in classBaseHttpMessageHandlerSpec<WebFluxMessageHandlerSpec,WebFluxRequestExecutingMessageHandler>
-
expectReply
- Overrides:
expectReply
in classBaseHttpMessageHandlerSpec<WebFluxMessageHandlerSpec,WebFluxRequestExecutingMessageHandler>
-