Class Flows


  • public final class Flows
    extends Object
    Utilities for Flow API.
    • Method Detail

      • emptyPublisher

        public static <T> Flow.Publisher<T> emptyPublisher()
        Empty publisher.
        Type Parameters:
        T - type of the publisher
        Returns:
        a new empty publisher that just completes the subscriber
      • singletonPublisher

        public static <T> Flow.Publisher<T> singletonPublisher​(T value)
        A publisher of a single value.
        Type Parameters:
        T - type of the publisher
        Parameters:
        value - value to publish
        Returns:
        a new publisher that publishes the single value and completes the subscriber