Class TestPublisher

java.lang.Object
org.apache.pekko.stream.testkit.TestPublisher

public class TestPublisher extends Object
Provides factory methods for various Publishers.
  • Constructor Details

    • TestPublisher

      public TestPublisher()
  • Method Details

    • empty

      public static <T> org.reactivestreams.Publisher<T> empty()
      Publisher that signals complete to subscribers, after handing a void subscription.
    • lazyEmpty

      public static <T> org.reactivestreams.Publisher<T> lazyEmpty()
      Publisher that subscribes the subscriber and completes after the first request.
    • error

      public static <T> org.reactivestreams.Publisher<T> error(Throwable cause)
      Publisher that signals error to subscribers immediately after handing out subscription.
    • lazyError

      public static <T> org.reactivestreams.Publisher<T> lazyError(Throwable cause)
      Publisher that subscribes the subscriber and signals error after the first request.
    • manualProbe

      public static <T> TestPublisher.ManualProbe<T> manualProbe(boolean autoOnSubscribe, ActorSystem system)
      Probe that implements Publisher interface.
    • manualProbe$default$1

      public static <T> boolean manualProbe$default$1()
    • probe

      public static <T> TestPublisher.Probe<T> probe(long initialPendingRequests, ActorSystem system)
      Probe that implements Publisher interface and tracks demand.
    • probe$default$1

      public static <T> long probe$default$1()