Interface Subscribable<T>

  • Type Parameters:
    T - item type
    All Superinterfaces:
    Flow.Publisher<T>
    All Known Subinterfaces:
    Multi<T>, Single<T>

    public interface Subscribable<T>
    extends Flow.Publisher<T>
    Decorated publisher that allows subscribing to individual events with java functions.
    • Method Detail

      • subscribe

        default void subscribe​(Consumer<? super T> consumer)
        Subscribe to this Single instance with the given delegate functions.
        Parameters:
        consumer - onNext delegate function
      • subscribe

        default void subscribe​(Consumer<? super T> consumer,
                               Consumer<? super Throwable> errorConsumer)
        Subscribe to this Single instance with the given delegate functions.
        Parameters:
        consumer - onNext delegate function
        errorConsumer - onError delegate function
      • subscribe

        default void subscribe​(Consumer<? super T> consumer,
                               Consumer<? super Throwable> errorConsumer,
                               Runnable completeConsumer)
        Subscribe to this Single instance with the given delegate functions.
        Parameters:
        consumer - onNext delegate function
        errorConsumer - onError delegate function
        completeConsumer - onComplete delegate function
      • subscribe

        default void subscribe​(Consumer<? super T> consumer,
                               Consumer<? super Throwable> errorConsumer,
                               Runnable completeConsumer,
                               Consumer<? super Flow.Subscription> subscriptionConsumer)
        Subscribe to this Single instance with the given delegate functions.
        Parameters:
        consumer - onNext delegate function
        errorConsumer - onError delegate function
        completeConsumer - onComplete delegate function
        subscriptionConsumer - onSusbcribe delegate function