public class WebClientReactiveRestClient extends AbstractReactiveRestClient implements SpringReactiveRestClient
SpringReactiveRestClient implementation.ReactiveRestClient.ReactiveInvocation, ReactiveRestClient.ReactiveRequestDefinitioncom.holonplatform.http.rest.RestClientOperations.InvocationOperations<RE,RP,RS,RL,RU>, com.holonplatform.http.rest.RestClientOperations.RequestConfiguration<R extends com.holonplatform.http.rest.RestClientOperations.RequestConfiguration<R>>| Constructor and Description |
|---|
WebClientReactiveRestClient(org.springframework.web.reactive.function.client.WebClient client)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.web.reactive.function.client.WebClient |
getClient()
Get the
WebClient bound to this RestClient. |
<T,R> reactor.core.publisher.Mono<ReactiveResponseEntity<T>> |
invoke(ReactiveRestClient.ReactiveRequestDefinition requestDefinition,
com.holonplatform.http.HttpMethod method,
com.holonplatform.http.rest.RequestEntity<R> requestEntity,
com.holonplatform.http.rest.ResponseType<T> responseType,
boolean onlySuccessfulStatusCode)
Invoke a request asynchronously using current given
request definition. |
clearDefaultHeaders, defaultTarget, getDefaultTarget, removeDefaultHeader, request, withDefaultHeaderequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreatepublic WebClientReactiveRestClient(org.springframework.web.reactive.function.client.WebClient client)
client - Spring WebClientpublic org.springframework.web.reactive.function.client.WebClient getClient()
SpringReactiveRestClientWebClient bound to this RestClient.getClient in interface SpringReactiveRestClientWebClient referencepublic <T,R> reactor.core.publisher.Mono<ReactiveResponseEntity<T>> invoke(ReactiveRestClient.ReactiveRequestDefinition requestDefinition, com.holonplatform.http.HttpMethod method, com.holonplatform.http.rest.RequestEntity<R> requestEntity, com.holonplatform.http.rest.ResponseType<T> responseType, boolean onlySuccessfulStatusCode)
ReactiveInvokerrequest definition.invoke in interface ReactiveInvokerT - Response typeR - Request entity typerequestDefinition - Request definitionmethod - Request methodrequestEntity - Request message payloadresponseType - Expected response payload typeonlySuccessfulStatusCode - true to return only 2xx status code response and throw
an UnsuccessfulResponseException otherwise, false to return any status code responsesMono to handle the ReactiveResponseEntity object as the result of the request
invocationCopyright © 2019 The Holon Platform. All rights reserved.