Interface StreamSubscriptionTimeoutSupport


  • public interface StreamSubscriptionTimeoutSupport
    INTERNAL API Provides support methods to create Publishers and Subscribers which time-out gracefully, and are canceled subscribing an CancellingSubscriber to the publisher, or by calling onError on the timed-out subscriber.

    See akka.stream.materializer.subscription-timeout for configuration options.

    • Method Detail

      • 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 actual Publisher or Processor 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.