com.holonplatform.jaxrs.client.internal

## Class JaxrsResponseEntity<T>

- java.lang.Object
- - com.holonplatform.jaxrs.client.internal.JaxrsResponseEntity<T>

- Type Parameters:
    `T` - Response entity type
  All Implemented Interfaces:
    com.holonplatform.core.messaging.Message<T,List<String>>, com.holonplatform.core.messaging.MessageHeaders<List<String>>, com.holonplatform.http.HttpHeaders, com.holonplatform.http.HttpMessage<T>, com.holonplatform.http.HttpResponse<T>, com.holonplatform.http.rest.ResponseEntity<T>
  Direct Known Subclasses:
    JaxrsRawResponseEntity, JaxrsReactiveResponseEntity

      public class JaxrsResponseEntity<T>
      extends Object
      implements com.holonplatform.http.rest.ResponseEntity<T>

  JAX-RS `ResponseEntity` implementation.
  Since:
    5.0.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.http.HttpResponse

      `com.holonplatform.http.HttpResponse.Builder<T>`

  - ### Field Summary

    - ### Fields inherited from interface com.holonplatform.http.HttpHeaders

      `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 Summary

    Constructors
    Constructor and Description
    `JaxrsResponseEntity(javax.ws.rs.core.Response response, com.holonplatform.http.rest.ResponseType<T> type)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.holonplatform.http.HttpResponse

      `builder, builder, getStatus`

    - ### Methods inherited from interface com.holonplatform.http.HttpMessage

      `getProtocol`

    - ### Methods inherited from interface com.holonplatform.http.HttpHeaders

      `getAuthorizationBasicCredentials, getAuthorizationBearer, getContentLength, getDate, getHeaderValue, getLocale, getLocales, getLocation`

    - ### Methods inherited from interface com.holonplatform.core.messaging.MessageHeaders

      `getHeader`

- - ### Constructor Detail

    - #### JaxrsResponseEntity

          public JaxrsResponseEntity(javax.ws.rs.core.Response response,
                                     com.holonplatform.http.rest.ResponseType<T> type)

      Constructor
      Parameters:
        `response` - JAX-RS Response (not null)
        `type` - Response type (not null)

  - ### Method Detail

    - #### getStatusCode

          public int getStatusCode()

      Specified by:
        `getStatusCode` in interface `com.holonplatform.http.HttpResponse<T>`

    - #### getHeaders

          public Map<String,List<String>> getHeaders()

      Specified by:
        `getHeaders` in interface `com.holonplatform.core.messaging.MessageHeaders<List<String>>`

    - #### getPayload

          public Optional<T> getPayload()
                                 throws UnsupportedOperationException

      Specified by:
        `getPayload` in interface `com.holonplatform.core.messaging.Message<T,List<String>>`
      Throws:
        `UnsupportedOperationException`

    - #### getPayloadType

          public Class<? extends T> getPayloadType()
                                            throws UnsupportedOperationException

      Specified by:
        `getPayloadType` in interface `com.holonplatform.core.messaging.Message<T,List<String>>`
      Throws:
        `UnsupportedOperationException`

    - #### as

          public <E> Optional<E> as(Class<E> entityType)

      Specified by:
        `as` in interface `com.holonplatform.http.rest.ResponseEntity<T>`

    - #### as

          public <E> Optional<E> as(com.holonplatform.http.rest.ResponseType<E> entityType)

      Specified by:
        `as` in interface `com.holonplatform.http.rest.ResponseEntity<T>`

    - #### close

          public void close()

      Specified by:
        `close` in interface `com.holonplatform.http.rest.ResponseEntity<T>`

Copyright © 2019 The Holon Platform. All rights reserved.