Interface ConnectionObserver.ReadObserver

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void itemRead()
      Invokes when a new item is read.
      void readCancelled()
      Callback when the read operation is cancelled.
      void readComplete()
      Callback when the entire read operation completes successfully.
      void readFailed​(java.lang.Throwable cause)
      Callback when the read operation fails with an error.
      void requestedToRead​(long n)
      Callback when new items are requested to read.
    • Method Detail

      • requestedToRead

        void requestedToRead​(long n)
        Callback when new items are requested to read.
        Parameters:
        n - number of requested items to read
      • itemRead

        void itemRead()
        Invokes when a new item is read.

        Content of the read items should be inspected at the higher level API when these items are consumed.

      • readFailed

        void readFailed​(java.lang.Throwable cause)
        Callback when the read operation fails with an error.
        Parameters:
        cause - Throwable that terminated the read
      • readComplete

        void readComplete()
        Callback when the entire read operation completes successfully.
      • readCancelled

        void readCancelled()
        Callback when the read operation is cancelled.