public class DisposeBag
extends java.lang.Object
Constructor and Description |
---|
DisposeBag() |
Modifier and Type | Method and Description |
---|---|
void |
add(rx.Subscription subscription)
Adds a subscription to the DisposeBag
|
void |
addAll(java.lang.Iterable<rx.Subscription> subscriptions)
Adds a collection of subscriptions to the DisposeBag
|
void |
disposeAll()
Unsubscribes all added subscribers that are still subscribed and haven't been garbage collected
The DisposeBag is still usable after this method is called
An attempt to unsubscribe is made on every subscription in the DisposeBag, even if a subscription throws
If any subscriptions do throw they are removed from the dispose bag and a Composite exception is thrown
that contains all throws at the end of the disposal process
|
public void add(rx.Subscription subscription)
subscription
- The subscription to addpublic void addAll(java.lang.Iterable<rx.Subscription> subscriptions)
subscriptions
- The subscriptions to addpublic void disposeAll()