Interface UniSubscriber<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onFailure​(java.lang.Throwable failure)
      Called if the computation of the item by the subscriber Uni failed.
      void onItem​(T item)
      Event handler called once the item has been computed by the subscribed Uni.
      void onSubscribe​(UniSubscription subscription)
      Event handler called once the subscribed Uni has taken into account the subscription.
    • Method Detail

      • onSubscribe

        void onSubscribe​(UniSubscription subscription)
        Event handler called once the subscribed Uni has taken into account the subscription. The Uni have triggered the computation of the item. IMPORTANT: onItem(Object) and onFailure(Throwable) would not be called before the invocation of this method.
        Parameters:
        subscription - the subscription allowing to cancel the computation.
      • onItem

        void onItem​(T item)
        Event handler called once the item has been computed by the subscribed Uni. IMPORTANT: this method will be only called once per subscription. If onFailure(Throwable) is called, this method won't be called.
        Parameters:
        item - the item, may be null.
      • onFailure

        void onFailure​(java.lang.Throwable failure)
        Called if the computation of the item by the subscriber Uni failed. IMPORTANT: this method will be only called once per subscription. If onItem(Object) is called, this method won't be called.
        Parameters:
        failure - the failure, cannot be null.