T - Response entity typepublic class ClientResponseEntity<T> extends Object implements ReactiveResponseEntity<T>
ResponseEntity implementation using a ClientResponse.ACCEPT, ACCEPT_CHARSET, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ACCEPT_RANGES, AGE, ALLOW, AUTHORIZATION, CACHE_CONTROL, CONNECTION, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_RANGE, CONTENT_TYPE, COOKIE, DATE, ETAG, EXPECT, EXPIRES, FROM, HOST, IF_MATCH, IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_RANGE, IF_UNMODIFIED_SINCE, LAST_MODIFIED, LINK, LOCATION, MAX_FORWARDS, ORIGIN, PRAGMA, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, RANGE, REFERER, RETRY_AFTER, SCHEME_BASIC, SCHEME_BEARER, SCHEME_DIGEST, SERVER, SET_COOKIE, TRAILER, TRANSFER_ENCODING, UPGRADE, USER_AGENT, VARY, VIA, WARNING, WWW_AUTHENTICATE| Constructor and Description |
|---|
ClientResponseEntity(org.springframework.web.reactive.function.client.ClientResponse response,
com.holonplatform.http.rest.ResponseType<T> type) |
| Modifier and Type | Method and Description |
|---|---|
<E> Optional<E> |
as(Class<E> entityType) |
<E> Optional<E> |
as(com.holonplatform.http.rest.ResponseType<E> entityType) |
<E> reactor.core.publisher.Flux<E> |
asFlux(Class<E> entityType)
Read the message entity as a
Flux of the specified type. |
reactor.core.publisher.Mono<InputStream> |
asInputStream()
Read the message entity as a raw
InputStream. |
reactor.core.publisher.Mono<T> |
asMono()
Read the message entity as a
Mono. |
<E> reactor.core.publisher.Mono<E> |
asMono(Class<E> entityType)
Read the message entity as a
Mono of the specified type. |
<E> reactor.core.publisher.Mono<E> |
asMono(com.holonplatform.http.rest.ResponseType<E> entityType)
Read the message entity as a
Mono of the specified type., using a ResponseType representation to
allow generic types support. |
void |
close() |
Map<String,List<String>> |
getHeaders() |
Optional<T> |
getPayload() |
Class<? extends T> |
getPayloadType() |
int |
getStatusCode() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic ClientResponseEntity(org.springframework.web.reactive.function.client.ClientResponse response,
com.holonplatform.http.rest.ResponseType<T> type)
public int getStatusCode()
getStatusCode in interface com.holonplatform.http.HttpResponse<T>public Class<? extends T> getPayloadType() throws UnsupportedOperationException
getPayloadType in interface com.holonplatform.core.messaging.Message<T,List<String>>UnsupportedOperationExceptionpublic reactor.core.publisher.Mono<T> asMono()
ReactiveResponseEntityMono.asMono in interface ReactiveResponseEntity<T>Mono containing the message entitypublic <E> reactor.core.publisher.Mono<E> asMono(Class<E> entityType)
ReactiveResponseEntityMono of the specified type.asMono in interface ReactiveResponseEntity<T>E - Entity instance typeentityType - Entity type (not null)Mono containing the message entitypublic <E> reactor.core.publisher.Mono<E> asMono(com.holonplatform.http.rest.ResponseType<E> entityType)
ReactiveResponseEntityMono of the specified type., using a ResponseType representation to
allow generic types support.asMono in interface ReactiveResponseEntity<T>E - Entity instance typeentityType - Entity response type (not null)Mono containing the message entitypublic <E> reactor.core.publisher.Flux<E> asFlux(Class<E> entityType)
ReactiveResponseEntityFlux of the specified type.asFlux in interface ReactiveResponseEntity<T>E - Entity instance typeentityType - Entity type (not null)Flux containing the message entitypublic reactor.core.publisher.Mono<InputStream> asInputStream()
ReactiveResponseEntityInputStream.asInputStream in interface ReactiveResponseEntity<T>Mono to handle the message entity streampublic Optional<T> getPayload() throws UnsupportedOperationException
getPayload in interface com.holonplatform.core.messaging.Message<T,List<String>>UnsupportedOperationExceptionpublic <E> Optional<E> as(Class<E> entityType)
as in interface com.holonplatform.http.rest.ResponseEntity<T>public <E> Optional<E> as(com.holonplatform.http.rest.ResponseType<E> entityType)
as in interface com.holonplatform.http.rest.ResponseEntity<T>public void close()
close in interface com.holonplatform.http.rest.ResponseEntity<T>Copyright © 2019 The Holon Platform. All rights reserved.