Package 

Interface Subscription


  • 
    public interface Subscription
    
                        

    Subscription returns from subscribe to allow unsubscribing.

    See the utilities in Subscriptions and the implementations in the {@code rx.subscriptions} package.

    This interface is the RxJava equivalent of {@code IDisposable} in Microsoft's Rx implementation.

    • Method Summary

      Modifier and Type Method Description
      abstract void unsubscribe() Stops the receipt of notifications on the Subscriber that was registered when this Subscriptionwas received.
      abstract boolean isUnsubscribed() Indicates whether this {@code Subscription} is currently unsubscribed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • unsubscribe

         abstract void unsubscribe()

        Stops the receipt of notifications on the Subscriber that was registered when this Subscriptionwas received.

        This allows deregistering an Subscriber before it has finished receiving all events (i.e. beforeonCompleted is called).

      • isUnsubscribed

         abstract boolean isUnsubscribed()

        Indicates whether this {@code Subscription} is currently unsubscribed.