org.jboss.resteasy.client

## Class ClientResponse<T>

- java.lang.Object
- - javax.ws.rs.core.Response
  - - org.jboss.resteasy.client.ClientResponse<T>

- Direct Known Subclasses:
    BaseClientResponse

  Deprecated.

      @Deprecated
      public abstract class ClientResponse<T>
      extends Response

  Response extension for the RESTEasy client framework. Use this, or Response in your client proxy interface method return type declarations if you want access to the response entity as well as status and header information.
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

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

      `Response.ResponseBuilder, Response.Status, Response.StatusType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientResponse()` Deprecated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Map<String,Object>` | `getAttributes()` Deprecated. Used to pass information to and between interceptors.
    `abstract T` | `getEntity()` Deprecated. Unmarshal the target entity from the response OutputStream.
    `abstract <T2> T2` | `getEntity(Class<T2> type)` Deprecated. Extract the response body with the provided type information This method actually does the reading on the OutputStream.
    `abstract <T2> T2` | `getEntity(Class<T2> type, Type genericType)` Deprecated. Extract the response body with the provided type information This method actually does the reading on the OutputStream.
    `abstract <T2> T2` | `getEntity(Class<T2> type, Type genericType, Annotation[] annotations)` Deprecated.
    `abstract <T2> T2` | `getEntity(GenericType<T2> type)` Deprecated. Extract the response body with the provided type information.
    `abstract <T2> T2` | `getEntity(GenericType<T2> type, Annotation[] annotations)` Deprecated.
    `abstract Link` | `getHeaderAsLink(String headerName)` Deprecated. Header is assumed to be a URL, a Link object is created from it if it exists.
    `abstract LinkHeader` | `getLinkHeader()` Deprecated. Get the link headers of the response.
    `abstract Link` | `getLocationLink()` Deprecated. Get the Location header as a Link so you can easily execute on it.
    `abstract MultivaluedMap<String,String>` | `getResponseHeaders()` Deprecated. This method returns the same exact map as Response.getMetadata() except as a map of strings rather than objects
    `abstract Response.Status` | `getResponseStatus()` Deprecated.
    `abstract void` | `releaseConnection()` Deprecated.
    `abstract void` | `resetStream()` Deprecated. Attempts to reset the InputStream of the response.

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

      `accepted, accepted, bufferEntity, close, created, fromResponse, getAllowedMethods, getCookies, getDate, getEntityTag, getHeaders, getHeaderString, getLanguage, getLastModified, getLength, getLink, getLinkBuilder, getLinks, getLocation, getMediaType, getMetadata, getStatus, getStatusInfo, getStringHeaders, hasEntity, hasLink, noContent, notAcceptable, notModified, notModified, notModified, ok, ok, ok, ok, ok, readEntity, readEntity, readEntity, readEntity, seeOther, serverError, status, status, status, temporaryRedirect`

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

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

- - ### Constructor Detail

    - #### ClientResponse

          public ClientResponse()

      Deprecated.

  - ### Method Detail

    - #### getResponseHeaders

          public abstract MultivaluedMap<String,String> getResponseHeaders()

      Deprecated.
      This method returns the same exact map as Response.getMetadata() except as a map of strings rather than objects
      Returns:

    - #### getResponseStatus

          public abstract Response.Status getResponseStatus()

      Deprecated.

    - #### getEntity

          public abstract T getEntity()

      Deprecated.
      Unmarshal the target entity from the response OutputStream. You must have type information set via otherwise, this will not work.

      This method actually does the reading on the OutputStream. It will only do the read once. Afterwards, it will cache the result and return the cached result.
      Specified by:
        `getEntity` in class `Response`
      Returns:

    - #### getEntity

          public abstract <T2> T2 getEntity(Class<T2> type)

      Deprecated.
      Extract the response body with the provided type information

      This method actually does the reading on the OutputStream. It will only do the read once. Afterwards, it will cache the result and return the cached result.
      Type Parameters:
        `T2` -
      Parameters:
        `type` -
        `genericType` -
      Returns:

    - #### getEntity

          public abstract <T2> T2 getEntity(Class<T2> type,
                          Type genericType)

      Deprecated.
      Extract the response body with the provided type information

      This method actually does the reading on the OutputStream. It will only do the read once. Afterwards, it will cache the result and return the cached result.
      Type Parameters:
        `T2` -
      Parameters:
        `type` -
        `genericType` -
      Returns:

    - #### getEntity

          public abstract <T2> T2 getEntity(Class<T2> type,
                          Type genericType,
                          Annotation[] annotations)

      Deprecated.
      Type Parameters:
        `T2` -
      Parameters:
        `type` -
        `genericType` -
        `annotations` -
      Returns:

    - #### getEntity

          public abstract <T2> T2 getEntity(GenericType<T2> type)

      Deprecated.
      Extract the response body with the provided type information. GenericType is a trick used to pass in generic type information to the resteasy runtime.

      For example:

           List list = response.getEntity(new GenericType() {});

           This method actually does the reading on the OutputStream.  It will only do the read once.  Afterwards, it will
           cache the result and return the cached result.

      Type Parameters:
        `T2` -
      Parameters:
        `type` -
      Returns:

    - #### getEntity

          public abstract <T2> T2 getEntity(GenericType<T2> type,
                          Annotation[] annotations)

      Deprecated.
      Type Parameters:
        `T2` -
      Parameters:
        `type` -
        `annotations` -
      Returns:

    - #### getLinkHeader

          public abstract LinkHeader getLinkHeader()

      Deprecated.
      Get the link headers of the response. All Link objects returned will automatically have the same ClientExecutor as the request.
      Returns:
        non-null

    - #### getLocationLink

          public abstract Link getLocationLink()

      Deprecated.
      Get the Location header as a Link so you can easily execute on it. All Link objects returned will automatically have the same ClientExecutor as the request.
      Returns:

    - #### getHeaderAsLink

          public abstract Link getHeaderAsLink(String headerName)

      Deprecated.
      Header is assumed to be a URL, a Link object is created from it if it exists. Also, the type field of the link with be initialized if there is another header appended with -Type. i.e. if the header was "custom" it will also look for a header of custom-type and expect that this is a media type.

      All Link objects returned will automatically have the same ClientExecutor as the request.
      Parameters:
        `headerName` -
      Returns:
        null if it doesn't exist

    - #### resetStream

          public abstract void resetStream()

      Deprecated.
      Attempts to reset the InputStream of the response. Useful for refetching an entity after a marshalling failure

    - #### releaseConnection

          public abstract void releaseConnection()

      Deprecated.

    - #### getAttributes

          public abstract Map<String,Object> getAttributes()

      Deprecated.
      Used to pass information to and between interceptors.
      Returns:

Copyright © 2014. All Rights Reserved.