Package org.jboss.resteasy.client.jaxrs.internal

## Class ClientResponse

- java.lang.Object
- - javax.ws.rs.core.Response
  - - org.jboss.resteasy.specimpl.AbstractBuiltResponse
    - - org.jboss.resteasy.specimpl.BuiltResponse
      - - org.jboss.resteasy.client.jaxrs.internal.ClientResponse

- All Implemented Interfaces:
    `AutoCloseable`
  Direct Known Subclasses:
    `FinalizedClientResponse`

      public abstract class ClientResponse
      extends BuiltResponse

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.jboss.resteasy.specimpl.AbstractBuiltResponse

      `AbstractBuiltResponse.InputStreamWrapper<T extends BuiltResponse>`

    - ### Nested classes/interfaces inherited from class javax.ws.rs.core.Response

      `javax.ws.rs.core.Response.ResponseBuilder, javax.ws.rs.core.Response.Status, javax.ws.rs.core.Response.StatusType`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected ClientConfiguration` | `configuration` |
    `protected Map<String,​Object>` | `properties` |
    `protected RESTEasyTracingLogger` | `tracingLogger` |

    - ### Fields inherited from class org.jboss.resteasy.specimpl.AbstractBuiltResponse

      `annotations, bufferedEntity, entity, entityClass, genericType, is, isClosed, metadata, processor, reason, status, streamFullyRead, streamRead`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `ClientResponse​(ClientConfiguration configuration)` | Deprecated.
    `protected` | `ClientResponse​(ClientConfiguration configuration, RESTEasyTracingLogger tracingLogger)` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `abortIfClosed()` |
    `boolean` | `bufferEntity()` |
    `void` | `close()` |
    `Object` | `getEntity()` |
    `Class<?>` | `getEntityClass()` |
    `protected InputStream` | `getEntityStream()` |
    `protected HeaderValueProcessor` | `getHeaderValueProcessor()` |
    `Map<String,​Object>` | `getProperties()` |
    `boolean` | `hasEntity()` |
    `void` | `noReleaseConnection()` | In case of an InputStream or Reader and a invocation that returns no Response object, we need to make sure the GC does not close the returned InputStream or Reader
    `protected <T> Object` | `readFrom​(Class<T> type, Type genericType, javax.ws.rs.core.MediaType media, Annotation[] annotations)` |
    `void` | `setClientConfiguration​(ClientConfiguration configuration)` |
    `void` | `setHeaders​(javax.ws.rs.core.MultivaluedMap<String,​String> headers)` |
    `protected abstract void` | `setInputStream​(InputStream is)` |
    `void` | `setProperties​(Map<String,​Object> properties)` |

    - ### Methods inherited from class org.jboss.resteasy.specimpl.BuiltResponse

      `getInputStream, readEntity, releaseConnection, releaseConnection`

    - ### Methods inherited from class org.jboss.resteasy.specimpl.AbstractBuiltResponse

      `addMethodAnnotations, getAllowedMethods, getAnnotations, getCookies, getDate, getEntityTag, getGenericType, getHeaderString, getLanguage, getLastModified, getLength, getLink, getLinkBuilder, getLinks, getLocation, getMediaType, getMetadata, getReasonPhrase, getStatus, getStatusInfo, getStringHeaders, hasLink, isClosed, readEntity, readEntity, readEntity, readEntity, resetEntity, setAnnotations, setEntity, setEntityClass, setGenericType, setMetadata, setReasonPhrase, setStatus, setStreamFullyRead, setStreamRead, toHeaderString`

    - ### Methods inherited from class javax.ws.rs.core.Response

      `accepted, accepted, created, fromResponse, getHeaders, noContent, notAcceptable, notModified, notModified, notModified, ok, ok, ok, ok, ok, seeOther, serverError, status, status, status, status, temporaryRedirect`

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

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

- - ### Field Detail

    - #### properties

          protected Map<String,​Object> properties

    - #### configuration

          protected ClientConfiguration configuration

    - #### tracingLogger

          protected RESTEasyTracingLogger tracingLogger

  - ### Constructor Detail

    - #### ClientResponse

          @Deprecated
          protected ClientResponse​(ClientConfiguration configuration)

      Deprecated.

    - #### ClientResponse

          protected ClientResponse​(ClientConfiguration configuration,
                                   RESTEasyTracingLogger tracingLogger)

  - ### Method Detail

    - #### setHeaders

          public void setHeaders​(javax.ws.rs.core.MultivaluedMap<String,​String> headers)

    - #### setProperties

          public void setProperties​(Map<String,​Object> properties)

    - #### getProperties

          public Map<String,​Object> getProperties()

    - #### setClientConfiguration

          public void setClientConfiguration​(ClientConfiguration configuration)

    - #### getEntity

          public Object getEntity()

      Overrides:
        `getEntity` in class `AbstractBuiltResponse`

    - #### getEntityClass

          public Class<?> getEntityClass()

      Overrides:
        `getEntityClass` in class `AbstractBuiltResponse`

    - #### hasEntity

          public boolean hasEntity()

      Overrides:
        `hasEntity` in class `AbstractBuiltResponse`

    - #### noReleaseConnection

          public void noReleaseConnection()

      In case of an InputStream or Reader and a invocation that returns no Response object, we need to make sure the GC does not close the returned InputStream or Reader

    - #### close

          public void close()

      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `AbstractBuiltResponse`

    - #### getHeaderValueProcessor

          protected HeaderValueProcessor getHeaderValueProcessor()

      Overrides:
        `getHeaderValueProcessor` in class `AbstractBuiltResponse`

    - #### getEntityStream

          protected InputStream getEntityStream()

      Overrides:
        `getEntityStream` in class `BuiltResponse`

    - #### setInputStream

          protected abstract void setInputStream​(InputStream is)

      Overrides:
        `setInputStream` in class `BuiltResponse`

    - #### readFrom

          protected <T> Object readFrom​(Class<T> type,
                                        Type genericType,
                                        javax.ws.rs.core.MediaType media,
                                        Annotation[] annotations)

      Overrides:
        `readFrom` in class `BuiltResponse`

    - #### bufferEntity

          public boolean bufferEntity()

      Overrides:
        `bufferEntity` in class `BuiltResponse`

    - #### abortIfClosed

          public void abortIfClosed()

      Overrides:
        `abortIfClosed` in class `AbstractBuiltResponse`