Interface SuspendableContainerRequestContext
-
- All Superinterfaces:
javax.ws.rs.container.ContainerRequestContext
- All Known Implementing Classes:
PostMatchContainerRequestContext
,PreMatchContainerRequestContext
,ResponseContainerRequestContext
public interface SuspendableContainerRequestContext extends javax.ws.rs.container.ContainerRequestContext
Suspendable request context, which allows the users to suspend execution of the filter chain until it is resumed normally, or abnormally with aThrowable
.- Author:
- Stéphane Épardaud
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
resume()
Resumes the current request, and proceeds to the next request filter, if any, or to the resource method.void
resume(Throwable t)
Aborts the current request with the given exception.void
suspend()
Suspends the current request.-
Methods inherited from interface javax.ws.rs.container.ContainerRequestContext
abortWith, getAcceptableLanguages, getAcceptableMediaTypes, getCookies, getDate, getEntityStream, getHeaders, getHeaderString, getLanguage, getLength, getMediaType, getMethod, getProperty, getPropertyNames, getRequest, getSecurityContext, getUriInfo, hasEntity, removeProperty, setEntityStream, setMethod, setProperty, setRequestUri, setRequestUri, setSecurityContext
-
-
-
-
Method Detail
-
suspend
void suspend()
Suspends the current request. This makes the current request asynchronous. No further request filter is executed until this request is resumed. No reply is going to be sent to the client until this request is resumed either withresume()
or aborted withresume(Throwable)
orContainerRequestContext.abortWith(javax.ws.rs.core.Response)
.
-
resume
void resume()
Resumes the current request, and proceeds to the next request filter, if any, or to the resource method.
-
resume
void resume(Throwable t)
Aborts the current request with the given exception. This behaves as if the request filter threw this exception synchronously, which means exceptions may be mapped via exception mappers, response filters will run and async response callbacks will be called with this exception.- Parameters:
t
- the exception to send back to the client, as mapped by the application.
-
-