T - Response entity typepublic class JaxrsResponseEntity<T> extends Object implements com.holonplatform.http.rest.ResponseEntity<T>
ResponseEntity implementation.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 |
|---|
JaxrsResponseEntity(javax.ws.rs.core.Response response,
com.holonplatform.http.rest.ResponseType<T> type)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
<E> Optional<E> |
as(Class<E> entityType) |
<E> Optional<E> |
as(com.holonplatform.http.rest.ResponseType<E> entityType) |
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 JaxrsResponseEntity(javax.ws.rs.core.Response response,
com.holonplatform.http.rest.ResponseType<T> type)
response - JAX-RS Response (not null)type - Response type (not null)public int getStatusCode()
getStatusCode in interface com.holonplatform.http.HttpResponse<T>public Optional<T> getPayload() throws UnsupportedOperationException
getPayload in interface com.holonplatform.core.messaging.Message<T,List<String>>UnsupportedOperationExceptionpublic Class<? extends T> getPayloadType() throws UnsupportedOperationException
getPayloadType 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.