AsyncContextCallback (Apache Tomcat 10.1.48 API Documentation)
Description: declaration: package: org.apache.coyote, interface: AsyncContextCallback

# Interface AsyncContextCallback

All Known Implementing Classes:
  `AsyncContextImpl`

public interface AsyncContextCallback
Provides a mechanism for the Coyote connectors to communicate with the `AsyncContext`. It is implemented in this manner so that the org.apache.coyote package does not have a dependency on the org.apache.catalina package.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `decrementInProgressAsyncCount()`
  Used to notify the Context that async processing has ended.
  `void`
  `fireOnComplete()`
  `void`
  `incrementInProgressAsyncCount()`
  Used to notify the Context that async processing has started.
  `boolean`
  `isAvailable()`
  Reports if the web application associated with this async request is available.

- ## Method Details

  - ### fireOnComplete

    void fireOnComplete()

  - ### isAvailable

    boolean isAvailable()
    Reports if the web application associated with this async request is available.
    Returns:
      `true` if the associated web application is available, otherwise `false`

  - ### incrementInProgressAsyncCount

    void incrementInProgressAsyncCount()
    Used to notify the Context that async processing has started. Specifically, for the counting of in-progress async requests to work correctly, this must be called exactly once every time the `AsyncStateMachine` transitions from DISPATCHED to any other state.

  - ### decrementInProgressAsyncCount

    void decrementInProgressAsyncCount()
    Used to notify the Context that async processing has ended. Specifically, for the counting of in-progress async requests to work correctly, this must be called exactly once every time the `AsyncStateMachine` transitions to DISPATCHED from any other state.