org.glassfish.jersey.server

## Interface AsyncContext

All Superinterfaces:
  jakarta.ws.rs.container.AsyncResponse

    public interface AsyncContext
    extends jakarta.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

### Nested Class Summary

Nested Classes
`static class` `AsyncContext.State` Asynchronous processing context state.

### Field Summary

### Fields inherited from interface jakarta.ws.rs.container.AsyncResponse

`NO_TIMEOUT`

### Method Summary

All Methods Instance Methods Abstract Methods
`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.
`boolean` `suspend()` Suspend the current asynchronous processing context.

### Methods inherited from interface jakarta.ws.rs.container.AsyncResponse

`cancel, cancel, cancel, isCancelled, isDone, isSuspended, register, register, register, register, resume, resume, setTimeout, setTimeoutHandler`

### Method Detail

#### suspend

    boolean suspend()

Suspend the current asynchronous processing context. The method returns `true` 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(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.