Interface AsyncContext
- All Superinterfaces:
javax.ws.rs.container.AsyncResponse
public interface AsyncContext
extends javax.ws.rs.container.AsyncResponse
Injectable asynchronous processing context that can be used to control various aspects
of asynchronous processing of a single request.
- Author:
- Marek Potociar (marek.potociar at oracle.com)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumAsynchronous processing context state. -
Field Summary
Fields inherited from interface javax.ws.rs.container.AsyncResponse
NO_TIMEOUT -
Method Summary
Modifier and TypeMethodDescriptionvoidinvokeManaged(org.glassfish.jersey.internal.util.Producer<javax.ws.rs.core.Response> producer) Invoke the provided response producer in a Jersey-managed asynchronous thread.booleansuspend()Suspend the current asynchronous processing context.Methods inherited from interface javax.ws.rs.container.AsyncResponse
cancel, cancel, cancel, isCancelled, isDone, isSuspended, register, register, register, register, resume, resume, setTimeout, setTimeoutHandler
-
Method Details
-
suspend
boolean suspend()Suspend the current asynchronous processing context. The method returnstrueif the context has been successfully suspended,falseotherwise.- Returns:
trueif the request processing has been suspended successfully suspended,falseotherwise.
-
invokeManaged
void invokeManaged(org.glassfish.jersey.internal.util.Producer<javax.ws.rs.core.Response> producer) Invoke the provided response producer in a Jersey-managed asynchronous thread.- Parameters:
producer- response producer.
-