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
Modifier and TypeFieldDescriptionprotected final HttpResponse
protected final BuiltResponse
protected final HttpRequest
-
Constructor Summary
ConstructorDescriptionContainerResponseContextImpl
(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 TypeMethodDescriptionboolean
containsHeaderString
(String name, String valueSeparatorRegex, Predicate<String> valuePredicate) boolean
containsHeaderString
(String name, Predicate<String> valuePredicate) void
filter()
getDate()
Class<?>
jakarta.ws.rs.core.EntityTag
getHeaderString
(String name) int
jakarta.ws.rs.core.Link
jakarta.ws.rs.core.Link.Builder
getLinkBuilder
(String relation) Set<jakarta.ws.rs.core.Link>
getLinks()
jakarta.ws.rs.core.MediaType
int
jakarta.ws.rs.core.Response.StatusType
boolean
boolean
void
resume()
Resumes the current response, and proceeds to the next response filter, if any, or to send the response.void
Aborts the current response with the given exception.void
void
setEntity
(Object entity, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) void
setEntityStream
(OutputStream entityStream) void
setStatus
(int code) void
setStatusInfo
(jakarta.ws.rs.core.Response.StatusType statusInfo) void
suspend()
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:
getStatus
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
setStatus
public void setStatus(int code) - Specified by:
setStatus
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getStatusInfo
public jakarta.ws.rs.core.Response.StatusType getStatusInfo()- Specified by:
getStatusInfo
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
setStatusInfo
public void setStatusInfo(jakarta.ws.rs.core.Response.StatusType statusInfo) - Specified by:
setStatusInfo
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityClass
- Specified by:
getEntityClass
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityType
- Specified by:
getEntityType
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
setEntity
- Specified by:
setEntity
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
setEntity
public void setEntity(Object entity, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType) - Specified by:
setEntity
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getHeaders
- Specified by:
getHeaders
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getAllowedMethods
- Specified by:
getAllowedMethods
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getDate
- Specified by:
getDate
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLanguage
- Specified by:
getLanguage
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLength
public int getLength()- Specified by:
getLength
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getMediaType
public jakarta.ws.rs.core.MediaType getMediaType()- Specified by:
getMediaType
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getCookies
- Specified by:
getCookies
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityTag
public jakarta.ws.rs.core.EntityTag getEntityTag()- Specified by:
getEntityTag
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLastModified
- Specified by:
getLastModified
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLocation
- Specified by:
getLocation
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLinks
- Specified by:
getLinks
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
hasLink
- Specified by:
hasLink
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLink
- Specified by:
getLink
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getLinkBuilder
- Specified by:
getLinkBuilder
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
hasEntity
public boolean hasEntity()- Specified by:
hasEntity
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntity
- Specified by:
getEntity
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityStream
- Specified by:
getEntityStream
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
setEntityStream
- Specified by:
setEntityStream
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getEntityAnnotations
- Specified by:
getEntityAnnotations
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getStringHeaders
- Specified by:
getStringHeaders
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
getHeaderString
- Specified by:
getHeaderString
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
containsHeaderString
- Specified by:
containsHeaderString
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
containsHeaderString
public boolean containsHeaderString(String name, String valueSeparatorRegex, Predicate<String> valuePredicate) - Specified by:
containsHeaderString
in interfacejakarta.ws.rs.container.ContainerResponseContext
-
suspend
public void suspend()Description copied from interface:SuspendableContainerResponseContext
Suspends 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:
suspend
in interfaceSuspendableContainerResponseContext
-
resume
public void resume()Description copied from interface:SuspendableContainerResponseContext
Resumes the current response, and proceeds to the next response filter, if any, or to send the response.- Specified by:
resume
in interfaceSuspendableContainerResponseContext
-
resume
Description copied from interface:SuspendableContainerResponseContext
Aborts 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:
resume
in interfaceSuspendableContainerResponseContext
- Parameters:
t
- the exception to send back to the client, as an internal server error.
-
filter
- Throws:
IOException
-