Class ContainerResponseContextImpl
java.lang.Object
org.jboss.resteasy.core.interception.jaxrs.ContainerResponseContextImpl
- All Implemented Interfaces:
jakarta.ws.rs.container.ContainerResponseContext,SuspendableContainerResponseContext
public class ContainerResponseContextImpl
extends Object
implements SuspendableContainerResponseContext
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final HttpResponseprotected final BuiltResponseprotected final HttpRequest -
Constructor Summary
ConstructorsConstructorDescriptionContainerResponseContextImpl(HttpRequest request, HttpResponse httpResponse, BuiltResponse serverResponse) Deprecated.ContainerResponseContextImpl(HttpRequest request, HttpResponse httpResponse, BuiltResponse serverResponse, ResponseContainerRequestContext requestContext, jakarta.ws.rs.container.ContainerResponseFilter[] responseFilters, Consumer<Throwable> onComplete, ServerResponseWriter.RunnableWithIOException continuation) -
Method Summary
Modifier and TypeMethodDescriptionvoidfilter()getDate()Class<?> jakarta.ws.rs.core.EntityTaggetHeaderString(String name) intjakarta.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.StatusTypebooleanbooleanvoidresume()Resumes the current response, and proceeds to the next response filter, if any, or to send the response.voidAborts the current response with the given exception.voidvoidsetEntity(Object entity, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) voidsetEntityStream(OutputStream entityStream) voidsetStatus(int code) voidsetStatusInfo(jakarta.ws.rs.core.Response.StatusType statusInfo) voidsuspend()Suspends the current response.
-
Field Details
-
request
-
httpResponse
-
jaxrsResponse
-
-
Constructor Details
-
ContainerResponseContextImpl
@Deprecated public ContainerResponseContextImpl(HttpRequest request, HttpResponse httpResponse, BuiltResponse serverResponse) Deprecated. -
ContainerResponseContextImpl
public ContainerResponseContextImpl(HttpRequest request, HttpResponse httpResponse, BuiltResponse serverResponse, ResponseContainerRequestContext requestContext, jakarta.ws.rs.container.ContainerResponseFilter[] responseFilters, Consumer<Throwable> onComplete, ServerResponseWriter.RunnableWithIOException continuation)
-
-
Method Details
-
getJaxrsResponse
-
getHttpResponse
-
getStatus
public int getStatus()- Specified by:
getStatusin interfacejakarta.ws.rs.container.ContainerResponseContext
-
setStatus
public void setStatus(int code) - Specified by:
setStatusin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getStatusInfo
public jakarta.ws.rs.core.Response.StatusType getStatusInfo()- Specified by:
getStatusInfoin interfacejakarta.ws.rs.container.ContainerResponseContext
-
setStatusInfo
public void setStatusInfo(jakarta.ws.rs.core.Response.StatusType statusInfo) - Specified by:
setStatusInfoin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityClass
- Specified by:
getEntityClassin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityType
- Specified by:
getEntityTypein interfacejakarta.ws.rs.container.ContainerResponseContext
-
setEntity
- Specified by:
setEntityin interfacejakarta.ws.rs.container.ContainerResponseContext
-
setEntity
public void setEntity(Object entity, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
setEntityin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getHeaders
- Specified by:
getHeadersin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getAllowedMethods
- Specified by:
getAllowedMethodsin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getDate
- Specified by:
getDatein interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLanguage
- Specified by:
getLanguagein interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLength
public int getLength()- Specified by:
getLengthin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getMediaType
public jakarta.ws.rs.core.MediaType getMediaType()- Specified by:
getMediaTypein interfacejakarta.ws.rs.container.ContainerResponseContext
-
getCookies
- Specified by:
getCookiesin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityTag
public jakarta.ws.rs.core.EntityTag getEntityTag()- Specified by:
getEntityTagin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLastModified
- Specified by:
getLastModifiedin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLocation
- Specified by:
getLocationin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLinks
- Specified by:
getLinksin interfacejakarta.ws.rs.container.ContainerResponseContext
-
hasLink
- Specified by:
hasLinkin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLink
- Specified by:
getLinkin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLinkBuilder
- Specified by:
getLinkBuilderin interfacejakarta.ws.rs.container.ContainerResponseContext
-
hasEntity
public boolean hasEntity()- Specified by:
hasEntityin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntity
- Specified by:
getEntityin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityStream
- Specified by:
getEntityStreamin interfacejakarta.ws.rs.container.ContainerResponseContext
-
setEntityStream
- Specified by:
setEntityStreamin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityAnnotations
- Specified by:
getEntityAnnotationsin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getStringHeaders
- Specified by:
getStringHeadersin interfacejakarta.ws.rs.container.ContainerResponseContext
-
getHeaderString
- Specified by:
getHeaderStringin interfacejakarta.ws.rs.container.ContainerResponseContext
-
suspend
public void suspend()Description copied from interface:SuspendableContainerResponseContextSuspends the current response. This makes the current request asynchronous. No further response filter is executed until this response is resumed. No reply is going to be sent to the client until this response is resumed either withSuspendableContainerResponseContext.resume()or aborted withSuspendableContainerResponseContext.resume(Throwable)orResponseContainerRequestContext.abortWith(jakarta.ws.rs.core.Response).- Specified by:
suspendin interfaceSuspendableContainerResponseContext
-
resume
public void resume()Description copied from interface:SuspendableContainerResponseContextResumes the current response, and proceeds to the next response filter, if any, or to send the response.- Specified by:
resumein interfaceSuspendableContainerResponseContext
-
resume
Description copied from interface:SuspendableContainerResponseContextAborts the current response with the given exception. This behaves as if the request filter threw this exception synchronously, which means that the exception will not be mapped by exception mappers, the response filters will stop running, and the async response callbacks will be called with this exception.- Specified by:
resumein interfaceSuspendableContainerResponseContext- Parameters:
t- the exception to send back to the client, as an internal server error.
-
filter
- Throws:
IOException
-