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 protectedWebFluxMessageHandlerSpec(String uri, WebClient webClient)protectedWebFluxMessageHandlerSpec(URI uri, WebClient webClient)protectedWebFluxMessageHandlerSpec(Expression uriExpression, WebClient webClient) -
Method Summary
Modifier and Type Method Description WebFluxMessageHandlerSpecbodyExtractor(BodyExtractor<?,ClientHttpResponse> bodyExtractor)Specify aBodyExtractoras an alternative to theexpectedResponseTypeto allow to get low-level access to the receivedClientHttpResponse.protected WebFluxMessageHandlerSpecexpectReply(boolean expectReply)protected booleanisClientSet()WebFluxMessageHandlerSpecpublisherElementType(Class<?> publisherElementType)Configure a type for a requestPublisherelements.WebFluxMessageHandlerSpecpublisherElementType(ParameterizedTypeReference<?> publisherElementType)Configure aParameterizedTypeReferencefor a requestPublisherelements.WebFluxMessageHandlerSpecpublisherElementTypeExpression(Expression publisherElementTypeExpression)Configure a SpEL expression to evaluate a requestPublisherelements type at runtime against a request message.<P> WebFluxMessageHandlerSpecpublisherElementTypeFunction(Function<Message<P>,?> typeFunction)Configure aFunctionto evaluate a requestPublisherelements type at runtime against a request message.WebFluxMessageHandlerSpecreplyPayloadToFlux(boolean replyPayloadToFlux)The boolean flag to identify if the reply payload should be as aFluxfrom the response body or as resolved value from theMonoof 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, uriVariablesFunctionMethods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods 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 aFluxfrom the response body or as resolved value from theMonoof the response body. Defaults tofalse- simple value is pushed downstream. Makes sense whenexpectedResponseTypeis configured.- Parameters:
replyPayloadToFlux- represent reply payload as aFluxor as a value from theMono.- Returns:
- the spec
- Since:
- 5.0.1
- See Also:
WebFluxRequestExecutingMessageHandler.setReplyPayloadToFlux(boolean)
-
bodyExtractor
Specify aBodyExtractoras an alternative to theexpectedResponseTypeto allow to get low-level access to the receivedClientHttpResponse.- Parameters:
bodyExtractor- theBodyExtractorto use.- Returns:
- the spec
- Since:
- 5.0.1
- See Also:
WebFluxRequestExecutingMessageHandler.setBodyExtractor(BodyExtractor)
-
publisherElementType
Configure a type for a requestPublisherelements.- Parameters:
publisherElementType- the type of the requestPublisherelements.- Returns:
- the spec
- Since:
- 5.2
- See Also:
WebFluxRequestExecutingMessageHandler.setPublisherElementType(java.lang.Class<?>)
-
publisherElementType
public WebFluxMessageHandlerSpec publisherElementType(ParameterizedTypeReference<?> publisherElementType)Configure aParameterizedTypeReferencefor a requestPublisherelements.- Parameters:
publisherElementType- the type of the requestPublisherelements.- Returns:
- the spec
- Since:
- 5.2
- See Also:
WebFluxRequestExecutingMessageHandler.setPublisherElementType(java.lang.Class<?>)
-
publisherElementTypeFunction
public <P> WebFluxMessageHandlerSpec publisherElementTypeFunction(Function<Message<P>,?> typeFunction)Configure aFunctionto evaluate a requestPublisherelements type at runtime against a request message.- Type Parameters:
P- the expected payload type.- Parameters:
typeFunction- theFunctionto evaluate a type for the requestPublisherelements.- Returns:
- the spec
- Since:
- 5.2
- See Also:
WebFluxRequestExecutingMessageHandler.setPublisherElementTypeExpression(Expression)
-
publisherElementTypeExpression
public WebFluxMessageHandlerSpec publisherElementTypeExpression(Expression publisherElementTypeExpression)Configure a SpEL expression to evaluate a requestPublisherelements type at runtime against a request message.- Parameters:
publisherElementTypeExpression- the expression to evaluate a type for the requestPublisherelements.- Returns:
- the spec
- Since:
- 5.2
- See Also:
WebFluxRequestExecutingMessageHandler.setPublisherElementTypeExpression(Expression)
-
isClientSet
protected boolean isClientSet()- Specified by:
isClientSetin classBaseHttpMessageHandlerSpec<WebFluxMessageHandlerSpec,WebFluxRequestExecutingMessageHandler>
-
expectReply
- Overrides:
expectReplyin classBaseHttpMessageHandlerSpec<WebFluxMessageHandlerSpec,WebFluxRequestExecutingMessageHandler>
-