Package org.glassfish.jersey.server
Interface AsyncContext
-
- All Superinterfaces:
javax.ws.rs.container.AsyncResponse
- All Known Implementing Classes:
ServerRuntime.AsyncResponder
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AsyncContext.State
Asynchronous processing context state.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
invokeManaged(Producer<javax.ws.rs.core.Response> producer)
Invoke the provided response producer in a Jersey-managed asynchronous thread.boolean
suspend()
Suspend the current asynchronous processing context.
-
-
-
Method Detail
-
suspend
boolean suspend()
Suspend the current asynchronous processing context. The method returnstrue
if the context has been successfully suspended,false
otherwise.- Returns:
true
if the request processing has been suspended successfully suspended,false
otherwise.
-
invokeManaged
void invokeManaged(Producer<javax.ws.rs.core.Response> producer)
Invoke the provided response producer in a Jersey-managed asynchronous thread.- Parameters:
producer
- response producer.
-
-