public class BuiltResponse extends AbstractBuiltResponse
AbstractBuiltResponse.InputStreamWrapper<T extends BuiltResponse>annotations, bufferedEntity, entity, entityClass, genericType, is, isClosed, metadata, processor, reason, status, streamFullyRead, streamRead| Constructor and Description |
|---|
BuiltResponse() |
BuiltResponse(int status,
Headers<Object> metadata,
Object entity,
Annotation[] entityAnnotations) |
BuiltResponse(int status,
String reason,
Headers<Object> metadata,
Object entity,
Annotation[] entityAnnotations) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bufferEntity() |
protected InputStream |
getEntityStream() |
protected InputStream |
getInputStream() |
<T> T |
readEntity(Class<T> type,
Type genericType,
Annotation[] anns) |
protected <T> Object |
readFrom(Class<T> type,
Type genericType,
javax.ws.rs.core.MediaType media,
Annotation[] annotations) |
void |
releaseConnection()
Release underlying connection but do not close.
|
void |
releaseConnection(boolean consumeInputStream)
Release underlying connection but do not close.
|
protected void |
setInputStream(InputStream is) |
abortIfClosed, addMethodAnnotations, close, getAllowedMethods, getAnnotations, getCookies, getDate, getEntity, getEntityClass, getEntityTag, getGenericType, getHeaderString, getHeaderValueProcessor, getLanguage, getLastModified, getLength, getLink, getLinkBuilder, getLinks, getLocation, getMediaType, getMetadata, getReasonPhrase, getStatus, getStatusInfo, getStringHeaders, hasEntity, hasLink, isClosed, readEntity, readEntity, readEntity, readEntity, resetEntity, setAnnotations, setEntity, setEntityClass, setGenericType, setMetadata, setReasonPhrase, setStatus, setStreamFullyRead, setStreamRead, toHeaderStringpublic BuiltResponse()
public BuiltResponse(int status,
Headers<Object> metadata,
Object entity,
Annotation[] entityAnnotations)
public BuiltResponse(int status,
String reason,
Headers<Object> metadata,
Object entity,
Annotation[] entityAnnotations)
public <T> T readEntity(Class<T> type, Type genericType, Annotation[] anns)
readEntity in class AbstractBuiltResponseprotected <T> Object readFrom(Class<T> type, Type genericType, javax.ws.rs.core.MediaType media, Annotation[] annotations)
protected InputStream getEntityStream()
getEntityStream in class AbstractBuiltResponseprotected void setInputStream(InputStream is)
setInputStream in class AbstractBuiltResponseprotected InputStream getInputStream()
getInputStream in class AbstractBuiltResponsepublic void releaseConnection()
throws IOException
AbstractBuiltResponsereleaseConnection in class AbstractBuiltResponseIOException - if I/O error occurredpublic void releaseConnection(boolean consumeInputStream)
throws IOException
AbstractBuiltResponsereleaseConnection in class AbstractBuiltResponseconsumeInputStream - boolean to indicate either the underlying input stream must be fully read before releasing the connection or not.
For most HTTP connection implementations, consuming the underlying input stream before releasing the connection will help to ensure connection reusability with respect of Keep-Alive policy.
IOException - if I/O error occuredpublic boolean bufferEntity()
bufferEntity in class javax.ws.rs.core.ResponseCopyright © 2019 JBoss by Red Hat. All rights reserved.