WriteListener (Apache Tomcat 7.0.104 API Documentation)

org.apache.coyote.http11.upgrade.servlet31

## Interface WriteListener

- All Superinterfaces:
    EventListener

      public interface WriteListener
      extends EventListener

  Receives notification of write events when using non-blocking IO.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `onError(Throwable throwable)` Invoked if an error occurs while writing the response.
    `void` | `onWritePossible()` Invoked when it it possible to write data without blocking.

- - ### Method Detail

    - #### onWritePossible

          void onWritePossible()
                               throws IOException

      Invoked when it it possible to write data without blocking. The container will invoke this method the first time for a request as soon as data can be written. Subsequent invocations will only occur if a call to `AbstractServletOutputStream.isReady()` has returned false and it has since become possible to write data.
      Throws:
        `IOException`

    - #### onError

          void onError(Throwable throwable)

      Invoked if an error occurs while writing the response.
      Parameters:
        `throwable` -

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.