Interface ConnectionObserver.WriteObserver

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void itemReceived()
      Callback when an item is received and ready to be written.
      void itemWritten()
      Callback when an item is written to the transport.
      void onFlushRequest()
      Callback when flush operation is requested.
      void requestedToWrite​(long n)
      Callback when new items are requested to write.
      void writeCancelled()
      Callback when the write operation is cancelled.
      void writeComplete()
      Callback when the entire write operation completes successfully.
      void writeFailed​(java.lang.Throwable cause)
      Callback when the write operation fails with an error.
    • Method Detail

      • requestedToWrite

        void requestedToWrite​(long n)
        Callback when new items are requested to write.
        Parameters:
        n - number of requested items to write
      • itemReceived

        void itemReceived()
        Callback when an item is received and ready to be written.

        Content of the received items should be inspected at the higher level API when these items are produced.

      • onFlushRequest

        void onFlushRequest()
        Callback when flush operation is requested.
      • itemWritten

        void itemWritten()
        Callback when an item is written to the transport.

        Content of the written items should be inspected at the higher level API when these items are produced.

      • writeFailed

        void writeFailed​(java.lang.Throwable cause)
        Callback when the write operation fails with an error.
        Parameters:
        cause - Throwable that terminated the write
      • writeComplete

        void writeComplete()
        Callback when the entire write operation completes successfully.
      • writeCancelled

        void writeCancelled()
        Callback when the write operation is cancelled.