public abstract class ClientResponse<T> extends Response
Response.ResponseBuilder, Response.Status, Response.StatusType
Constructor and Description |
---|
ClientResponse() |
Modifier and Type | Method and Description |
---|---|
abstract Map<String,Object> |
getAttributes()
Used to pass information to and between interceptors.
|
abstract T |
getEntity()
Unmarshal the target entity from the response OutputStream.
|
abstract <T2> T2 |
getEntity(Class<T2> type)
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)
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) |
abstract <T2> T2 |
getEntity(GenericType<T2> type)
Extract the response body with the provided type information.
|
abstract <T2> T2 |
getEntity(GenericType<T2> type,
Annotation[] annotations) |
abstract Link |
getHeaderAsLink(String headerName)
Header is assumed to be a URL, a Link object is created from it if it exists.
|
abstract MultivaluedMap<String,String> |
getHeaders()
This method returns the same exact map as Response.getMetadata() except as a map of strings rather than objects
|
abstract LinkHeader |
getLinkHeader()
Get the link headers of the response.
|
abstract Link |
getLocation()
Get the Location header as a Link so you can easily execute on it.
|
abstract Response.Status |
getResponseStatus() |
abstract void |
releaseConnection() |
abstract void |
resetStream()
Attempts to reset the InputStream of the response.
|
created, fromResponse, getMetadata, getStatus, noContent, notAcceptable, notModified, notModified, notModified, ok, ok, ok, ok, ok, seeOther, serverError, status, status, status, temporaryRedirect
public abstract MultivaluedMap<String,String> getHeaders()
public abstract Response.Status getResponseStatus()
public abstract T getEntity()
getEntity
in class Response
MessageBodyWriter
public abstract <T2> T2 getEntity(Class<T2> type)
T2
- type
- genericType
- public abstract <T2> T2 getEntity(Class<T2> type, Type genericType)
T2
- type
- genericType
- public abstract <T2> T2 getEntity(Class<T2> type, Type genericType, Annotation[] annotations)
T2
- type
- genericType
- annotations
- public abstract <T2> T2 getEntity(GenericType<T2> type)
Listlist = 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.
T2
- type
- public abstract <T2> T2 getEntity(GenericType<T2> type, Annotation[] annotations)
T2
- type
- annotations
- public abstract LinkHeader getLinkHeader()
public abstract Link getLocation()
public abstract Link getHeaderAsLink(String headerName)
headerName
- public abstract void resetStream()
public abstract void releaseConnection()
Copyright © 2018 JBoss by Red Hat. All rights reserved.