Package org.glassfish.jersey.server
Interface AsyncContext
-
- All Superinterfaces:
jakarta.ws.rs.container.AsyncResponse
public interface AsyncContext extends jakarta.ws.rs.container.AsyncResponseInjectable asynchronous processing context that can be used to control various aspects of asynchronous processing of a single request.- Author:
- Marek Potociar
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAsyncContext.StateAsynchronous processing context state.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinvokeManaged(org.glassfish.jersey.internal.util.Producer<jakarta.ws.rs.core.Response> producer)Invoke the provided response producer in a Jersey-managed asynchronous thread.booleansuspend()Suspend the current asynchronous processing context.
-
-
-
Method Detail
-
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<jakarta.ws.rs.core.Response> producer)
Invoke the provided response producer in a Jersey-managed asynchronous thread.- Parameters:
producer- response producer.
-
-