Class RefCountSubscription

java.lang.Object
rx.subscriptions.RefCountSubscription
All Implemented Interfaces:
Subscription

public final class RefCountSubscription extends Object implements Subscription
Keeps track of the sub-subscriptions and unsubscribes the underlying subscription once all sub-subscriptions have unsubscribed.
  • Field Details

  • Constructor Details

  • Method Details

    • get

      public Subscription get()
      Returns a new sub-subscription
      Returns:
      a new sub-subscription.
    • isUnsubscribed

      public boolean isUnsubscribed()
      Description copied from interface: Subscription
      Indicates whether this Subscription is currently unsubscribed.
      Specified by:
      isUnsubscribed in interface Subscription
      Returns:
      true if this Subscription is currently unsubscribed, false otherwise
    • unsubscribe

      public void unsubscribe()
      Description copied from interface: Subscription
      Stops the receipt of notifications on the Subscriber that was registered when this Subscription was received.

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

      Specified by:
      unsubscribe in interface Subscription
    • unsubscribeActualIfApplicable

      private void unsubscribeActualIfApplicable(RefCountSubscription.State state)
    • unsubscribeAChild

      void unsubscribeAChild()