Interface SuspendableContainerResponseContext
- All Superinterfaces:
jakarta.ws.rs.container.ContainerResponseContext
- All Known Implementing Classes:
ContainerResponseContextImpl
public interface SuspendableContainerResponseContext
extends jakarta.ws.rs.container.ContainerResponseContext
Suspendable response context, which allows the users to suspend execution of the filter
chain until it is resumed normally, or abnormally with a
Throwable
.- Author:
- Stéphane Épardaud
-
Method Summary
Methods inherited from interface jakarta.ws.rs.container.ContainerResponseContext
containsHeaderString, containsHeaderString, getAllowedMethods, getCookies, getDate, getEntity, getEntityAnnotations, getEntityClass, getEntityStream, getEntityTag, getEntityType, getHeaders, getHeaderString, getLanguage, getLastModified, getLength, getLink, getLinkBuilder, getLinks, getLocation, getMediaType, getStatus, getStatusInfo, getStringHeaders, hasEntity, hasLink, setEntity, setEntity, setEntityStream, setStatus, setStatusInfo
-
Method Details
-
suspend
void suspend()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 withresume()
or aborted withresume(Throwable)
orResponseContainerRequestContext.abortWith(jakarta.ws.rs.core.Response)
. -
resume
void resume()Resumes the current response, and proceeds to the next response filter, if any, or to send the response. -
resume
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.- Parameters:
t
- the exception to send back to the client, as an internal server error.
-