Package akka.stream.impl
Interface StreamSubscriptionTimeoutSupport
-
public interface StreamSubscriptionTimeoutSupport
INTERNAL API Provides support methods to create Publishers and Subscribers which time-out gracefully, and are canceled subscribing anCancellingSubscriber
to the publisher, or by callingonError
on the timed-out subscriber.See
akka.stream.materializer.subscription-timeout
for configuration options.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
StreamSubscriptionTimeoutSupport.CancelingSubscriber$
A subscriber who callscancel
directly fromonSubscribe
and ignores all other callbacks.static class
StreamSubscriptionTimeoutSupport.NoopSubscriptionTimeout$
INTERNAL API
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancel(org.reactivestreams.Publisher<?> target, scala.concurrent.duration.FiniteDuration timeout)
void
handleSubscriptionTimeout(org.reactivestreams.Publisher<?> target, java.lang.Exception cause)
Callback that should ensure that the target is canceled with the given cause.Cancellable
scheduleSubscriptionTimeout(ActorRef actor, java.lang.Object message)
Schedules a Subscription timeout.void
subscriptionTimedOut(org.reactivestreams.Publisher<?> target)
Called by the actor when a subscription has timed out.StreamSubscriptionTimeoutSettings
subscriptionTimeoutSettings()
Default settings for subscription timeouts.void
warn(org.reactivestreams.Publisher<?> target, scala.concurrent.duration.FiniteDuration timeout)
-
-
-
Method Detail
-
subscriptionTimeoutSettings
StreamSubscriptionTimeoutSettings subscriptionTimeoutSettings()
Default settings for subscription timeouts.
-
scheduleSubscriptionTimeout
Cancellable scheduleSubscriptionTimeout(ActorRef actor, java.lang.Object message)
Schedules a Subscription timeout. The actor will receive the message created by the provided block if the timeout triggers.
-
cancel
void cancel(org.reactivestreams.Publisher<?> target, scala.concurrent.duration.FiniteDuration timeout)
-
warn
void warn(org.reactivestreams.Publisher<?> target, scala.concurrent.duration.FiniteDuration timeout)
-
subscriptionTimedOut
void subscriptionTimedOut(org.reactivestreams.Publisher<?> target)
Called by the actor when a subscription has timed out. Expects the actualPublisher
orProcessor
target.
-
handleSubscriptionTimeout
void handleSubscriptionTimeout(org.reactivestreams.Publisher<?> target, java.lang.Exception cause)
Callback that should ensure that the target is canceled with the given cause.
-
-