Interface Observer<T>

  • Type Parameters:
    T - The object type to react to.

    public interface Observer<T>
    Callback interface to provide a client side callback when invoking ServerOperations.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onCompleted()
      Notifies the Observer that the Observable has finished sending push-based messages.
      void onError​(Throwable e)
      Notifies the Observer that the Observable has experienced an error condition.
      void onNext​(T t)
      Provides the Observer with a new item to observe.
    • Method Detail

      • onNext

        void onNext​(T t)
        Provides the Observer with a new item to observe.

        The Observable may call this method 0 or more times.

        The Observable will not call this method again after it calls either onCompleted() or onError(java.lang.Throwable).

        Parameters:
        t - the item emitted by the Observable
      • onCompleted

        void onCompleted()
        Notifies the Observer that the Observable has finished sending push-based messages.

        The Observable will not call this method if it calls onError(java.lang.Throwable).

      • onError

        void onError​(Throwable e)
        Notifies the Observer that the Observable has experienced an error condition.

        If the Observable calls this method, it will not thereafter call onNext(T) or onCompleted().

        Parameters:
        e - the exception encountered by the Observable