Package org.apache.pekko.stream.testkit
Class TestPublisher
java.lang.Object
org.apache.pekko.stream.testkit.TestPublisher
Provides factory methods for various Publishers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic classstatic classstatic classstatic classSingle subscription and demand tracking forTestPublisher.ManualProbe.static classstatic interfacestatic final classstatic classstatic final classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> org.reactivestreams.Publisher<T>empty()Publisher that signals complete to subscribers, after handing a void subscription.static <T> org.reactivestreams.Publisher<T>Publisher that signals error to subscribers immediately after handing out subscription.static <T> org.reactivestreams.Publisher<T>Publisher that subscribes the subscriber and completes after the first request.static <T> org.reactivestreams.Publisher<T>Publisher that subscribes the subscriber and signals error after the first request.static <T> TestPublisher.ManualProbe<T>manualProbe(boolean autoOnSubscribe, ActorSystem system) Probe that implementsPublisherinterface.static <T> booleanstatic <T> TestPublisher.Probe<T>probe(long initialPendingRequests, ActorSystem system) Probe that implementsPublisherinterface and tracks demand.static <T> long
-
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
Publisher that signals error to subscribers immediately after handing out subscription. -
lazyError
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 implementsPublisherinterface. -
manualProbe$default$1
public static <T> boolean manualProbe$default$1() -
probe
Probe that implementsPublisherinterface and tracks demand. -
probe$default$1
public static <T> long probe$default$1()
-