Interface LatestStateSubscription.AsyncSubscriber<T>

Enclosing class:
LatestStateSubscription<T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface LatestStateSubscription.AsyncSubscriber<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    hookOnFinally(reactor.core.publisher.SignalType signalType)
    Called exactly once when the upstream flux terminates, regardless of whether it completed, errored, or was cancelled.
    void
    hookOnNext(T value, Runnable doFinally)
    Handles a value, typically by launching an asynchronous task.
  • Method Details

    • hookOnNext

      void hookOnNext(T value, Runnable doFinally)
      Handles a value, typically by launching an asynchronous task. Must run doFinally when the task is complete.
      Parameters:
      value - Most recent value from the upstream Flux.
      doFinally - Callback to run after asynchronous processing is complete.
    • hookOnFinally

      default void hookOnFinally(reactor.core.publisher.SignalType signalType)
      Called exactly once when the upstream flux terminates, regardless of whether it completed, errored, or was cancelled. No further values will be processed after this.
      Parameters:
      signalType - the terminal signal from the upstream flux.