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, toHeaderString
protected 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 BuiltResponse
public boolean hasEntity()
hasEntity
in class BuiltResponse
public void noReleaseConnection()
public void close()
close
in class BuiltResponse
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
protected HeaderValueProcessor getHeaderValueProcessor()
getHeaderValueProcessor
in class BuiltResponse
protected 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.IOException
public <T> T readEntity(java.lang.Class<T> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] anns)
readEntity
in class BuiltResponse
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)
public boolean bufferEntity()
bufferEntity
in class BuiltResponse
public void abortIfClosed()
abortIfClosed
in class BuiltResponse