Package org.jboss.resteasy.specimpl
Class AbstractBuiltResponse
java.lang.Object
jakarta.ws.rs.core.Response
org.jboss.resteasy.specimpl.AbstractBuiltResponse
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
BuiltResponse
public abstract class AbstractBuiltResponse
extends jakarta.ws.rs.core.Response
A response object not attached to a client or server invocation.
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classNested classes/interfaces inherited from class jakarta.ws.rs.core.Response
jakarta.ws.rs.core.Response.ResponseBuilder, jakarta.ws.rs.core.Response.Status, jakarta.ws.rs.core.Response.StatusType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Annotation[]protected byte[]protected Objectprotected Classprotected Typeprotected InputStreamprotected booleanprotected HeaderValueProcessorprotected Stringprotected intprotected booleanprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionAbstractBuiltResponse(int status, String reason, Headers<Object> metadata, Object entity, Annotation[] entityAnnotations) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddMethodAnnotations(Annotation[] methodAnnotations) voidclose()getDate()protected abstract InputStreamjakarta.ws.rs.core.EntityTaggetHeaderString(String name) protected HeaderValueProcessorprotected abstract InputStreamintjakarta.ws.rs.core.Linkjakarta.ws.rs.core.Link.BuildergetLinkBuilder(String relation) Set<jakarta.ws.rs.core.Link> getLinks()jakarta.ws.rs.core.MediaTypeintjakarta.ws.rs.core.Response.StatusTypebooleanbooleanbooleanisClosed()<T> TreadEntity(jakarta.ws.rs.core.GenericType<T> entityType) <T> TreadEntity(jakarta.ws.rs.core.GenericType<T> entityType, Annotation[] annotations) <T> TreadEntity(Class<T> type) <T> TreadEntity(Class<T> type, Annotation[] annotations) abstract <T> TreadEntity(Class<T> type, Type genericType, Annotation[] anns) abstract voidRelease underlying connection but do not close.abstract voidreleaseConnection(boolean consumeInputStream) Release underlying connection but do not close.protected voidvoidsetAnnotations(Annotation[] annotations) voidvoidsetEntityClass(Class entityClass) voidsetGenericType(Type genericType) protected abstract voidvoidsetMetadata(jakarta.ws.rs.core.MultivaluedMap<String, Object> metadata) voidsetReasonPhrase(String reason) voidsetStatus(int status) voidvoidprotected StringtoHeaderString(Object header) Methods inherited from class jakarta.ws.rs.core.Response
accepted, accepted, bufferEntity, created, fromResponse, getHeaders, noContent, notAcceptable, notModified, notModified, notModified, ok, ok, ok, ok, ok, seeOther, serverError, status, status, status, status, temporaryRedirect
-
Field Details
-
entity
-
status
protected int status -
reason
-
metadata
-
annotations
-
entityClass
-
genericType
-
processor
-
isClosed
protected volatile boolean isClosed -
is
-
bufferedEntity
protected byte[] bufferedEntity -
streamRead
protected volatile boolean streamRead -
streamFullyRead
protected volatile boolean streamFullyRead
-
-
Constructor Details
-
AbstractBuiltResponse
public AbstractBuiltResponse() -
AbstractBuiltResponse
public AbstractBuiltResponse(int status, String reason, Headers<Object> metadata, Object entity, Annotation[] entityAnnotations)
-
-
Method Details
-
getInputStream
-
setInputStream
-
getEntityStream
-
releaseConnection
Release underlying connection but do not close.- Throws:
IOException- if I/O error occurred
-
releaseConnection
Release underlying connection but do not close.- Parameters:
consumeInputStream- 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.
- Throws:
IOException- if I/O error occured
-
getEntityClass
-
setEntityClass
-
getHeaderValueProcessor
-
getEntity
- Specified by:
getEntityin classjakarta.ws.rs.core.Response
-
getStatus
public int getStatus()- Specified by:
getStatusin classjakarta.ws.rs.core.Response
-
getReasonPhrase
-
getStatusInfo
public jakarta.ws.rs.core.Response.StatusType getStatusInfo()- Specified by:
getStatusInfoin classjakarta.ws.rs.core.Response
-
getMetadata
- Specified by:
getMetadatain classjakarta.ws.rs.core.Response
-
setEntity
-
setStatus
public void setStatus(int status) -
setReasonPhrase
-
setMetadata
-
getAnnotations
-
addMethodAnnotations
-
setAnnotations
-
getGenericType
-
setGenericType
-
readEntity
- Specified by:
readEntityin classjakarta.ws.rs.core.Response
-
readEntity
- Specified by:
readEntityin classjakarta.ws.rs.core.Response
-
readEntity
- Specified by:
readEntityin classjakarta.ws.rs.core.Response
-
readEntity
public <T> T readEntity(jakarta.ws.rs.core.GenericType<T> entityType) - Specified by:
readEntityin classjakarta.ws.rs.core.Response
-
readEntity
-
resetEntity
protected void resetEntity() -
setStreamRead
-
setStreamFullyRead
-
hasEntity
public boolean hasEntity()- Specified by:
hasEntityin classjakarta.ws.rs.core.Response
-
isClosed
public boolean isClosed()- Overrides:
isClosedin classjakarta.ws.rs.core.Response
-
abortIfClosed
public void abortIfClosed() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classjakarta.ws.rs.core.Response
-
getLanguage
- Specified by:
getLanguagein classjakarta.ws.rs.core.Response
-
getLength
public int getLength()- Specified by:
getLengthin classjakarta.ws.rs.core.Response
-
getMediaType
public jakarta.ws.rs.core.MediaType getMediaType()- Specified by:
getMediaTypein classjakarta.ws.rs.core.Response
-
getCookies
- Specified by:
getCookiesin classjakarta.ws.rs.core.Response
-
getEntityTag
public jakarta.ws.rs.core.EntityTag getEntityTag()- Specified by:
getEntityTagin classjakarta.ws.rs.core.Response
-
getDate
- Specified by:
getDatein classjakarta.ws.rs.core.Response
-
getLastModified
- Specified by:
getLastModifiedin classjakarta.ws.rs.core.Response
-
getAllowedMethods
- Specified by:
getAllowedMethodsin classjakarta.ws.rs.core.Response
-
toHeaderString
-
getStringHeaders
- Specified by:
getStringHeadersin classjakarta.ws.rs.core.Response
-
getHeaderString
- Specified by:
getHeaderStringin classjakarta.ws.rs.core.Response
-
getLocation
- Specified by:
getLocationin classjakarta.ws.rs.core.Response
-
getLinks
- Specified by:
getLinksin classjakarta.ws.rs.core.Response
-
hasLink
- Specified by:
hasLinkin classjakarta.ws.rs.core.Response
-
getLink
- Specified by:
getLinkin classjakarta.ws.rs.core.Response
-
getLinkBuilder
- Specified by:
getLinkBuilderin classjakarta.ws.rs.core.Response
-