Package akka.stream.testkit
Class TestPublisher
- java.lang.Object
-
- akka.stream.testkit.TestPublisher
-
public class TestPublisher extends java.lang.Object
Provides factory methods for various Publishers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TestPublisher.CancelSubscription
static class
TestPublisher.CancelSubscription$
static class
TestPublisher.ManualProbe<I>
static class
TestPublisher.ManualProbe$
static class
TestPublisher.Probe<T>
Single subscription and demand tracking forTestPublisher.ManualProbe
.static class
TestPublisher.Probe$
static interface
TestPublisher.PublisherEvent
static class
TestPublisher.RequestMore
static class
TestPublisher.RequestMore$
static class
TestPublisher.Subscribe
static class
TestPublisher.Subscribe$
static class
TestPublisher.SubscriptionDone$
-
Constructor Summary
Constructors Constructor Description TestPublisher()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> org.reactivestreams.Publisher<T>
empty()
Publisher that signals complete to subscribers, after handing a void subscription.static <T> org.reactivestreams.Publisher<T>
error(java.lang.Throwable cause)
Publisher that signals error to subscribers immediately after handing out subscription.static <T> org.reactivestreams.Publisher<T>
lazyEmpty()
Publisher that subscribes the subscriber and completes after the first request.static <T> org.reactivestreams.Publisher<T>
lazyError(java.lang.Throwable cause)
Publisher that subscribes the subscriber and signals error after the first request.static <T> TestPublisher.ManualProbe<T>
manualProbe(boolean autoOnSubscribe, ActorSystem system)
Probe that implementsPublisher
interface.static <T> boolean
manualProbe$default$1()
static <T> TestPublisher.Probe<T>
probe(long initialPendingRequests, ActorSystem system)
Probe that implementsPublisher
interface and tracks demand.static <T> long
probe$default$1()
-
-
-
Method Detail
-
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(java.lang.Throwable cause)
Publisher that signals error to subscribers immediately after handing out subscription.
-
lazyError
public static <T> org.reactivestreams.Publisher<T> lazyError(java.lang.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 implementsPublisher
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 implementsPublisher
interface and tracks demand.
-
probe$default$1
public static <T> long probe$default$1()
-
-