|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.ws.rs.core.Response org.jboss.resteasy.client.ClientResponse<T> org.jboss.resteasy.client.core.BaseClientResponse<T>
public class BaseClientResponse<T>
Nested Class Summary | |
---|---|
static interface |
BaseClientResponse.BaseClientResponseStreamFactory
|
Nested classes/interfaces inherited from class javax.ws.rs.core.Response |
---|
Response.ResponseBuilder, Response.Status, Response.StatusType |
Field Summary | |
---|---|
protected java.lang.String |
alternateMediaType
|
protected java.lang.annotation.Annotation[] |
annotations
|
protected java.lang.String |
attributeExceptionsTo
|
protected boolean |
cacheInputStream
|
protected java.lang.Exception |
exception
|
protected ClientExecutor |
executor
|
protected java.lang.reflect.Type |
genericReturnType
|
protected MultivaluedMap<java.lang.String,java.lang.String> |
headers
|
protected LinkHeader |
linkHeader
|
protected Link |
location
|
protected MessageBodyReaderInterceptor[] |
messageBodyReaderInterceptors
|
protected ResteasyProviderFactory |
providerFactory
|
protected java.lang.Class<?> |
returnType
|
protected int |
status
|
protected BaseClientResponse.BaseClientResponseStreamFactory |
streamFactory
|
protected boolean |
streamWasRead
|
protected java.lang.Object |
unmarshaledEntity
|
protected boolean |
wasReleased
|
Constructor Summary | |
---|---|
BaseClientResponse(BaseClientResponse.BaseClientResponseStreamFactory streamFactory)
|
|
BaseClientResponse(BaseClientResponse.BaseClientResponseStreamFactory streamFactory,
ClientExecutor executor)
|
Method Summary | ||
---|---|---|
void |
checkFailureStatus()
|
|
ClientResponseFailure |
createResponseFailure(java.lang.String message)
|
|
ClientResponseFailure |
createResponseFailure(java.lang.String message,
java.lang.Exception e)
|
|
protected void |
finalize()
|
|
java.lang.annotation.Annotation[] |
getAnnotations()
|
|
java.lang.String |
getAttributeExceptionsTo()
|
|
T |
getEntity()
Unmarshal the target entity from the response OutputStream. |
|
|
getEntity(java.lang.Class<T2> type)
Extract the response body with the provided type information This method actually does the reading on the OutputStream. |
|
|
getEntity(java.lang.Class<T2> type,
java.lang.reflect.Type genericType)
Extract the response body with the provided type information This method actually does the reading on the OutputStream. |
|
|
getEntity(java.lang.Class<T2> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] anns)
|
|
|
getEntity(GenericType<T2> genericType)
Extract the response body with the provided type information. |
|
|
getEntity(GenericType<T2> genericType,
java.lang.annotation.Annotation[] ann)
|
|
java.lang.Exception |
getException()
|
|
Link |
getHeaderAsLink(java.lang.String headerName)
Header is assumed to be a URL, a Link object is created from it if it exists. |
|
MultivaluedMap<java.lang.String,java.lang.String> |
getHeaders()
This method returns the same exact map as Response.getMetadata() except as a map of strings rather than objects |
|
LinkHeader |
getLinkHeader()
Get the link headers of the response. |
|
Link |
getLocation()
Get the Location header as a Link so you can easily execute on it. |
|
protected MediaType |
getMediaType()
|
|
MultivaluedMap<java.lang.String,java.lang.Object> |
getMetadata()
Get metadata associated with the response as a map. |
|
java.lang.String |
getResponseHeader(java.lang.String headerKey)
|
|
Response.Status |
getResponseStatus()
|
|
java.lang.Class<?> |
getReturnType()
|
|
int |
getStatus()
Get the status code associated with the response. |
|
BaseClientResponse.BaseClientResponseStreamFactory |
getStreamFactory()
|
|
protected
|
readFrom(java.lang.Class<T2> type,
java.lang.reflect.Type genericType,
MediaType media,
java.lang.annotation.Annotation[] annotations)
|
|
void |
releaseConnection()
|
|
void |
setAlternateMediaType(java.lang.String alternateMediaType)
|
|
void |
setAnnotations(java.lang.annotation.Annotation[] annotations)
|
|
void |
setAttributeExceptionsTo(java.lang.String attributeExceptionsTo)
|
|
void |
setException(java.lang.Exception exception)
|
|
void |
setGenericReturnType(java.lang.reflect.Type genericReturnType)
|
|
void |
setHeaders(MultivaluedMap<java.lang.String,java.lang.String> headers)
|
|
void |
setMessageBodyReaderInterceptors(MessageBodyReaderInterceptor[] messageBodyReaderInterceptors)
|
|
void |
setProviderFactory(ResteasyProviderFactory providerFactory)
|
|
void |
setReturnType(java.lang.Class<T> returnType)
|
|
void |
setStatus(int status)
|
|
void |
setStreamFactory(BaseClientResponse.BaseClientResponseStreamFactory streamFactory)
|
|
boolean |
wasReleased()
|
Methods inherited from class javax.ws.rs.core.Response |
---|
created, fromResponse, noContent, notAcceptable, notModified, notModified, notModified, ok, ok, ok, ok, ok, seeOther, serverError, status, status, status, temporaryRedirect |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ResteasyProviderFactory providerFactory
protected java.lang.String attributeExceptionsTo
protected MultivaluedMap<java.lang.String,java.lang.String> headers
protected java.lang.String alternateMediaType
protected java.lang.Class<?> returnType
protected java.lang.reflect.Type genericReturnType
protected java.lang.annotation.Annotation[] annotations
protected int status
protected boolean wasReleased
protected boolean streamWasRead
protected java.lang.Object unmarshaledEntity
protected MessageBodyReaderInterceptor[] messageBodyReaderInterceptors
protected java.lang.Exception exception
protected boolean cacheInputStream
protected BaseClientResponse.BaseClientResponseStreamFactory streamFactory
protected LinkHeader linkHeader
protected Link location
protected ClientExecutor executor
Constructor Detail |
---|
public BaseClientResponse(BaseClientResponse.BaseClientResponseStreamFactory streamFactory, ClientExecutor executor)
public BaseClientResponse(BaseClientResponse.BaseClientResponseStreamFactory streamFactory)
Method Detail |
---|
public void setMessageBodyReaderInterceptors(MessageBodyReaderInterceptor[] messageBodyReaderInterceptors)
public void setStatus(int status)
public void setHeaders(MultivaluedMap<java.lang.String,java.lang.String> headers)
public void setProviderFactory(ResteasyProviderFactory providerFactory)
public void setReturnType(java.lang.Class<T> returnType)
public java.lang.Class<?> getReturnType()
public void setGenericReturnType(java.lang.reflect.Type genericReturnType)
public void setAnnotations(java.lang.annotation.Annotation[] annotations)
public java.lang.String getAttributeExceptionsTo()
public void setAttributeExceptionsTo(java.lang.String attributeExceptionsTo)
public java.lang.Exception getException()
public void setException(java.lang.Exception exception)
public java.lang.annotation.Annotation[] getAnnotations()
public java.lang.String getResponseHeader(java.lang.String headerKey)
public LinkHeader getLinkHeader()
ClientResponse
getLinkHeader
in class ClientResponse<T>
public Link getLocation()
ClientResponse
getLocation
in class ClientResponse<T>
public Link getHeaderAsLink(java.lang.String headerName)
ClientResponse
getHeaderAsLink
in class ClientResponse<T>
public void setAlternateMediaType(java.lang.String alternateMediaType)
public BaseClientResponse.BaseClientResponseStreamFactory getStreamFactory()
public void setStreamFactory(BaseClientResponse.BaseClientResponseStreamFactory streamFactory)
public T getEntity()
ClientResponse
getEntity
in class ClientResponse<T>
MessageBodyWriter
public <T2> T2 getEntity(java.lang.Class<T2> type)
ClientResponse
getEntity
in class ClientResponse<T>
public <T2> T2 getEntity(java.lang.Class<T2> type, java.lang.reflect.Type genericType)
ClientResponse
getEntity
in class ClientResponse<T>
public <T2> T2 getEntity(java.lang.Class<T2> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] anns)
getEntity
in class ClientResponse<T>
protected MediaType getMediaType()
protected <T2> java.lang.Object readFrom(java.lang.Class<T2> type, java.lang.reflect.Type genericType, MediaType media, java.lang.annotation.Annotation[] annotations)
public <T2> T2 getEntity(GenericType<T2> genericType)
ClientResponse
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.
- Specified by:
getEntity
in classClientResponse<T>
- Returns:
public <T2> T2 getEntity(GenericType<T2> genericType, java.lang.annotation.Annotation[] ann)
getEntity
in class ClientResponse<T>
public MultivaluedMap<java.lang.String,java.lang.String> getHeaders()
ClientResponse
getHeaders
in class ClientResponse<T>
public MultivaluedMap<java.lang.String,java.lang.Object> getMetadata()
Response
RuntimeDelegate.HeaderDelegate
if one is available via
RuntimeDelegate.createHeaderDelegate(java.lang.Class)
for the class of the value or using the values toString
method if a
header delegate is not available.
getMetadata
in class Response
public int getStatus()
Response
getStatus
in class Response
public void checkFailureStatus()
public ClientResponseFailure createResponseFailure(java.lang.String message)
public ClientResponseFailure createResponseFailure(java.lang.String message, java.lang.Exception e)
public Response.Status getResponseStatus()
getResponseStatus
in class ClientResponse<T>
public boolean wasReleased()
public final void releaseConnection()
releaseConnection
in class ClientResponse<T>
protected final void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |