Class WebFluxMessageHandlerSpec
java.lang.Object
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:
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
FieldsFields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec
logger, PARSER, targetFields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTEFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWebFluxMessageHandlerSpec(String uri, WebClient webClient) protectedWebFluxMessageHandlerSpec(URI uri, WebClient webClient) protectedWebFluxMessageHandlerSpec(Expression uriExpression, WebClient webClient) -
Method Summary
Modifier and TypeMethodDescriptionbodyExtractor(BodyExtractor<?, ? super ClientHttpResponse> bodyExtractor) Specify aBodyExtractoras an alternative to theexpectedResponseTypeto allow to get low-level access to the receivedClientHttpResponse.protected WebFluxMessageHandlerSpecexpectReply(boolean expectReply) protected booleanpublisherElementType(Class<?> publisherElementType) Configure a type for a requestPublisherelements.publisherElementType(ParameterizedTypeReference<?> publisherElementType) Configure aParameterizedTypeReferencefor a requestPublisherelements.publisherElementTypeExpression(Expression publisherElementTypeExpression) Configure a SpEL expression to evaluate a requestPublisherelements type at runtime against a request message.publisherElementTypeFunction(Function<Message<P>, ?> typeFunction) Configure aFunctionto evaluate a requestPublisherelements type at runtime against a request message.replyPayloadToFlux(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, afterPropertiesSet, destroy, doGet, getId, getObject, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.FactoryBean
isSingleton
-
Field Details
-
webClient
-
-
Constructor Details
-
WebFluxMessageHandlerSpec
-
WebFluxMessageHandlerSpec
-
WebFluxMessageHandlerSpec
-
-
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:
-
bodyExtractor
public WebFluxMessageHandlerSpec bodyExtractor(BodyExtractor<?, ? super ClientHttpResponse> 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:
-
publisherElementType
Configure a type for a requestPublisherelements.- Parameters:
publisherElementType- the type of the requestPublisherelements.- Returns:
- the spec
- Since:
- 5.2
- See Also:
-
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:
-
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:
-
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:
-
isClientSet
protected boolean isClientSet()- Specified by:
isClientSetin classBaseHttpMessageHandlerSpec<WebFluxMessageHandlerSpec,WebFluxRequestExecutingMessageHandler>
-
expectReply
-