public class DefaultReactiveRequestDefinition extends com.holonplatform.http.internal.rest.AbstractRequestDefinition<ReactiveRestClient.ReactiveRequestDefinition> implements ReactiveRestClient.ReactiveRequestDefinition
ReactiveRestClient.ReactiveRequestDefinition implementation.| Constructor and Description |
|---|
DefaultReactiveRequestDefinition(ReactiveInvoker invoker)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T,R> reactor.core.publisher.Mono<ReactiveResponseEntity<T>> |
invoke(com.holonplatform.http.HttpMethod method,
com.holonplatform.http.rest.RequestEntity<R> requestEntity,
com.holonplatform.http.rest.ResponseType<T> responseType)
Invoke the request and asynchronously receive a response back.
|
<T,R> reactor.core.publisher.Mono<T> |
invokeForEntity(com.holonplatform.http.HttpMethod method,
com.holonplatform.http.rest.RequestEntity<R> requestEntity,
com.holonplatform.http.rest.ResponseType<T> responseType)
Invoke the request and asynchronously receive back the response content entity.
|
<T,R> reactor.core.publisher.Flux<T> |
invokeForFlux(com.holonplatform.http.HttpMethod method,
com.holonplatform.http.rest.RequestEntity<R> requestEntity,
Class<T> responseElementType)
Invoke the request and asynchronously receive back the response as a
Flux of response entity
elements. |
<R> reactor.core.publisher.Mono<InputStream> |
invokeForStream(com.holonplatform.http.HttpMethod method,
com.holonplatform.http.rest.RequestEntity<R> requestEntity)
Invoke the request and asynchronously receive back the response as a raw
InputStream. |
<T,R> reactor.core.publisher.Mono<ReactiveResponseEntity<T>> |
invokeForSuccess(com.holonplatform.http.HttpMethod method,
com.holonplatform.http.rest.RequestEntity<R> requestEntity,
com.holonplatform.http.rest.ResponseType<T> responseType)
Invoke the request and asynchronously receive a response back only if the response has a success
(
2xx) status code. |
accept, accept, acceptCharset, acceptCharset, acceptEncoding, acceptLanguage, acceptLanguage, authorizationBasic, authorizationBearer, cacheControl, getBaseRequestURI, getHeaders, getPropertySet, getQueryParameters, getRequestPath, getRequestURI, getTemplateParameters, header, path, propertySet, propertySet, queryParameter, resolve, resolve, target, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaccept, accept, acceptCharset, acceptCharset, acceptEncoding, acceptLanguage, acceptLanguage, authorizationBasic, authorizationBearer, cacheControl, getBaseRequestURI, getHeaders, getPropertySet, getQueryParameters, getRequestPath, getRequestURI, getTemplateParameters, header, path, propertySet, propertySet, queryParameter, resolve, resolve, target, targetdelete, delete, delete, deleteForEntity, deleteForEntity, deleteOrFail, get, get, getAsList, getForEntity, getForEntity, getForStream, head, options, options, options, optionsForEntity, optionsForEntity, patch, patch, patch, patchForEntity, patchForEntity, post, post, post, postForEntity, postForEntity, postForLocation, put, put, put, putForEntity, putForEntity, trace, trace, trace, traceForEntity, traceForEntitypublic DefaultReactiveRequestDefinition(ReactiveInvoker invoker)
invoker - Invoker to use to invoke for responsepublic <T,R> reactor.core.publisher.Mono<ReactiveResponseEntity<T>> invoke(com.holonplatform.http.HttpMethod method, com.holonplatform.http.rest.RequestEntity<R> requestEntity, com.holonplatform.http.rest.ResponseType<T> responseType)
ReactiveRestClient.ReactiveInvocationThe response payload is processed and possibly converted by concrete client implementation.
invoke in interface com.holonplatform.http.rest.RestClientOperations.InvocationOperations<reactor.core.publisher.Mono<?>,reactor.core.publisher.Mono<?>,reactor.core.publisher.Mono<InputStream>,reactor.core.publisher.Flux<?>,reactor.core.publisher.Mono<URI>>invoke in interface ReactiveRestClient.ReactiveInvocationT - Response typeR - Request entity typemethod - Request methodrequestEntity - Request entityresponseType - Expected response payload typeMono to handle the ReactiveResponseEntity object as the result of the request
invocationpublic <T,R> reactor.core.publisher.Mono<ReactiveResponseEntity<T>> invokeForSuccess(com.holonplatform.http.HttpMethod method, com.holonplatform.http.rest.RequestEntity<R> requestEntity, com.holonplatform.http.rest.ResponseType<T> responseType)
ReactiveRestClient.ReactiveInvocation2xx) status code.invokeForSuccess in interface com.holonplatform.http.rest.RestClientOperations.InvocationOperations<reactor.core.publisher.Mono<?>,reactor.core.publisher.Mono<?>,reactor.core.publisher.Mono<InputStream>,reactor.core.publisher.Flux<?>,reactor.core.publisher.Mono<URI>>invokeForSuccess in interface ReactiveRestClient.ReactiveInvocationT - Response typeR - Request entity typemethod - Request methodrequestEntity - Request entityresponseType - Expected response payload typeMono to handle the ReactiveResponseEntity object as a result of the request
invocationpublic <T,R> reactor.core.publisher.Mono<T> invokeForEntity(com.holonplatform.http.HttpMethod method,
com.holonplatform.http.rest.RequestEntity<R> requestEntity,
com.holonplatform.http.rest.ResponseType<T> responseType)
ReactiveRestClient.ReactiveInvocationinvokeForEntity in interface com.holonplatform.http.rest.RestClientOperations.InvocationOperations<reactor.core.publisher.Mono<?>,reactor.core.publisher.Mono<?>,reactor.core.publisher.Mono<InputStream>,reactor.core.publisher.Flux<?>,reactor.core.publisher.Mono<URI>>invokeForEntity in interface ReactiveRestClient.ReactiveInvocationT - Response typeR - Request entity typemethod - Request methodrequestEntity - Request entityresponseType - Expected response payload typeMono to handle the response payload of expected type as the result of the request
invocation, or an empty Optional if not present (empty response entity)public <R> reactor.core.publisher.Mono<InputStream> invokeForStream(com.holonplatform.http.HttpMethod method, com.holonplatform.http.rest.RequestEntity<R> requestEntity)
ReactiveRestClient.ReactiveInvocationInputStream.invokeForStream in interface ReactiveRestClient.ReactiveInvocationR - Request entity typemethod - Request methodrequestEntity - Request entityMono to handle the response payload stream * @throws HttpClientInvocationException Internal
invocation failure (for example, an I/O error on communication channel or expected and actual payload
type mismatch)public <T,R> reactor.core.publisher.Flux<T> invokeForFlux(com.holonplatform.http.HttpMethod method,
com.holonplatform.http.rest.RequestEntity<R> requestEntity,
Class<T> responseElementType)
ReactiveRestClient.ReactiveInvocationFlux of response entity
elements.invokeForFlux in interface ReactiveRestClient.ReactiveInvocationT - Response typeR - Request entity typemethod - Request methodrequestEntity - Request entityresponseElementType - Expected response entity elements typeFlux to handle the response payload elementsCopyright © 2019 The Holon Platform. All rights reserved.