Interface WriteListener


  • interface WriteListener
    Callback notification mechanism that signals to the developer it's possible to write content without blocking.

    Based on Servlet 3.1

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onError​(java.lang.Throwable t)
      Invoked when an error occurs writing data using the non-blocking APIs.
      void onWritePossible()
      When an instance of the WriteListener is registered with a BodyOutputStream, this method will be invoked by the container the first time when it is possible to write data.
    • Method Detail

      • onWritePossible

        void onWritePossible()
                      throws java.io.IOException
        When an instance of the WriteListener is registered with a BodyOutputStream, this method will be invoked by the container the first time when it is possible to write data. Subsequently the container will invoke this method if and only if BodyOutputStream.isReady() method has been called and has returned false.
        Throws:
        java.io.IOException - if an I/O related error has occurred during processing
      • onError

        void onError​(java.lang.Throwable t)
        Invoked when an error occurs writing data using the non-blocking APIs.