public abstract class ClientResponse extends BuiltResponse
| Modifier and Type | Class and Description |
|---|---|
private static class |
ClientResponse.InputStreamWrapper |
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
bufferedEntity |
protected ClientConfiguration |
configuration |
protected java.util.Map<java.lang.String,java.lang.Object> |
properties |
annotations, entity, entityClass, genericType, isClosed, metadata, processor, status| Modifier | Constructor and Description |
|---|---|
protected |
ClientResponse(ClientConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
abortIfClosed() |
boolean |
bufferEntity() |
void |
close() |
protected void |
finalize() |
java.lang.Object |
getEntity() |
protected java.io.InputStream |
getEntityStream() |
protected HeaderValueProcessor |
getHeaderValueProcessor() |
protected abstract java.io.InputStream |
getInputStream() |
java.util.Map<java.lang.String,java.lang.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
|
<T> T |
readEntity(java.lang.Class<T> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] anns) |
protected <T> java.lang.Object |
readFrom(java.lang.Class<T> type,
java.lang.reflect.Type genericType,
javax.ws.rs.core.MediaType media,
java.lang.annotation.Annotation[] annotations) |
abstract void |
releaseConnection()
release underlying connection but do not close
|
void |
setClientConfiguration(ClientConfiguration configuration) |
void |
setHeaders(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> headers) |
protected abstract void |
setInputStream(java.io.InputStream is) |
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties) |
addMethodAnnotations, getAllowedMethods, getAnnotations, getCookies, getDate, getEntityClass, getEntityTag, getGenericType, getHeaderString, getLanguage, getLastModified, getLength, getLink, getLinkBuilder, getLinkHeaders, getLinks, getLocation, getMediaType, getMetadata, getStatus, getStatusInfo, getStringHeaders, hasLink, isClosed, readEntity, readEntity, readEntity, readEntity, setAnnotations, setEntity, setEntityClass, setGenericType, setMetadata, setStatus, toHeaderStringprotected java.util.Map<java.lang.String,java.lang.Object> properties
protected ClientConfiguration configuration
protected byte[] bufferedEntity
protected ClientResponse(ClientConfiguration configuration)
public void setHeaders(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> headers)
public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
public void setClientConfiguration(ClientConfiguration configuration)
public java.lang.Object getEntity()
getEntity in class BuiltResponsepublic boolean hasEntity()
hasEntity in class BuiltResponsepublic void noReleaseConnection()
public void close()
close in class BuiltResponseprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwableprotected HeaderValueProcessor getHeaderValueProcessor()
getHeaderValueProcessor in class BuiltResponseprotected abstract java.io.InputStream getInputStream()
protected java.io.InputStream getEntityStream()
protected abstract void setInputStream(java.io.InputStream is)
public abstract void releaseConnection()
throws java.io.IOException
java.io.IOExceptionpublic <T> T readEntity(java.lang.Class<T> type,
java.lang.reflect.Type genericType,
java.lang.annotation.Annotation[] anns)
readEntity in class BuiltResponseprotected <T> java.lang.Object readFrom(java.lang.Class<T> type,
java.lang.reflect.Type genericType,
javax.ws.rs.core.MediaType media,
java.lang.annotation.Annotation[] annotations)
public boolean bufferEntity()
bufferEntity in class BuiltResponsepublic void abortIfClosed()
abortIfClosed in class BuiltResponse