public class WebFluxMessageHandlerSpec extends BaseHttpMessageHandlerSpec<WebFluxMessageHandlerSpec,WebFluxRequestExecutingMessageHandler>
BaseHttpMessageHandlerSpec
implementation for the WebFluxRequestExecutingMessageHandler
.WebFluxRequestExecutingMessageHandler
Modifier and Type | Field and Description |
---|---|
protected WebClient |
webClient |
PARSER, target
logger
DEFAULT_PHASE
OBJECT_TYPE_ATTRIBUTE
Modifier | Constructor and Description |
---|---|
protected |
WebFluxMessageHandlerSpec(Expression uriExpression,
WebClient webClient) |
protected |
WebFluxMessageHandlerSpec(String uri,
WebClient webClient) |
protected |
WebFluxMessageHandlerSpec(URI uri,
WebClient webClient) |
Modifier and Type | Method and Description |
---|---|
WebFluxMessageHandlerSpec |
bodyExtractor(BodyExtractor<?,ClientHttpResponse> bodyExtractor)
Specify a
BodyExtractor as an alternative to the expectedResponseType
to allow to get low-level access to the received ClientHttpResponse . |
protected WebFluxMessageHandlerSpec |
expectReply(boolean expectReply) |
protected boolean |
isClientSet() |
WebFluxMessageHandlerSpec |
publisherElementType(Class<?> publisherElementType)
Configure a type for a request
Publisher elements. |
WebFluxMessageHandlerSpec |
publisherElementType(ParameterizedTypeReference<?> publisherElementType)
Configure a
ParameterizedTypeReference for a request Publisher elements. |
WebFluxMessageHandlerSpec |
publisherElementTypeExpression(Expression publisherElementTypeExpression)
Configure a SpEL expression to evaluate a request
Publisher
elements type at runtime against a request message. |
<P> WebFluxMessageHandlerSpec |
publisherElementTypeFunction(java.util.function.Function<Message<P>,?> typeFunction)
Configure a
Function to evaluate a request Publisher
elements type at runtime against a request message. |
WebFluxMessageHandlerSpec |
replyPayloadToFlux(boolean replyPayloadToFlux)
The boolean flag to identify if the reply payload should be as a
Flux from the response body
or as resolved value from the Mono
of the response body. |
charset, encodeUri, encodingMode, expectedResponseType, expectedResponseType, expectedResponseTypeExpression, expectedResponseTypeFunction, extractPayload, getComponentsToRegister, headerMapper, httpMethod, httpMethodExpression, httpMethodFunction, mappedRequestHeaders, mappedResponseHeaders, transferCookies, uriVariable, uriVariable, uriVariable, uriVariableExpressions, uriVariablesExpression, uriVariablesExpression, uriVariablesFunction
_this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton
protected final WebClient webClient
protected WebFluxMessageHandlerSpec(Expression uriExpression, WebClient webClient)
public WebFluxMessageHandlerSpec replyPayloadToFlux(boolean replyPayloadToFlux)
Flux
from the response body
or as resolved value from the Mono
of the response body.
Defaults to false
- simple value is pushed downstream.
Makes sense when expectedResponseType
is configured.replyPayloadToFlux
- represent reply payload as a
Flux
or as a value from the
Mono
.WebFluxRequestExecutingMessageHandler.setReplyPayloadToFlux(boolean)
public WebFluxMessageHandlerSpec bodyExtractor(BodyExtractor<?,ClientHttpResponse> bodyExtractor)
BodyExtractor
as an alternative to the expectedResponseType
to allow to get low-level access to the received ClientHttpResponse
.bodyExtractor
- the BodyExtractor
to use.WebFluxRequestExecutingMessageHandler.setBodyExtractor(BodyExtractor)
public WebFluxMessageHandlerSpec publisherElementType(Class<?> publisherElementType)
Publisher
elements.publisherElementType
- the type of the request Publisher
elements.WebFluxRequestExecutingMessageHandler.setPublisherElementType(java.lang.Class<?>)
public WebFluxMessageHandlerSpec publisherElementType(ParameterizedTypeReference<?> publisherElementType)
ParameterizedTypeReference
for a request Publisher
elements.publisherElementType
- the type of the request Publisher
elements.WebFluxRequestExecutingMessageHandler.setPublisherElementType(java.lang.Class<?>)
public <P> WebFluxMessageHandlerSpec publisherElementTypeFunction(java.util.function.Function<Message<P>,?> typeFunction)
Function
to evaluate a request Publisher
elements type at runtime against a request message.P
- the expected payload type.typeFunction
- the Function
to evaluate a type for the request
Publisher
elements.WebFluxRequestExecutingMessageHandler.setPublisherElementTypeExpression(Expression)
public WebFluxMessageHandlerSpec publisherElementTypeExpression(Expression publisherElementTypeExpression)
Publisher
elements type at runtime against a request message.publisherElementTypeExpression
- the expression to evaluate a type for the request
Publisher
elements.WebFluxRequestExecutingMessageHandler.setPublisherElementTypeExpression(Expression)
protected boolean isClientSet()
isClientSet
in class BaseHttpMessageHandlerSpec<WebFluxMessageHandlerSpec,WebFluxRequestExecutingMessageHandler>
protected WebFluxMessageHandlerSpec expectReply(boolean expectReply)