public final class SubscriptionList extends Object implements Subscription
Constructor and Description |
---|
SubscriptionList()
Constructs an empty SubscriptionList.
|
SubscriptionList(Subscription... subscriptions)
Constructs a SubscriptionList with the given initial child subscriptions.
|
SubscriptionList(Subscription s)
Constructs a SubscriptionList with the given initial child subscription.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Subscription s)
|
void |
clear() |
boolean |
hasSubscriptions()
Returns true if this composite is not unsubscribed and contains subscriptions.
|
boolean |
isUnsubscribed()
Indicates whether this
Subscription is currently unsubscribed. |
void |
remove(Subscription s) |
void |
unsubscribe()
Unsubscribe from all of the subscriptions in the list, which stops the receipt of notifications on
the associated
Subscriber . |
public SubscriptionList()
public SubscriptionList(Subscription... subscriptions)
subscriptions
- the array of subscriptions to start withpublic SubscriptionList(Subscription s)
s
- the initial subscription instancepublic boolean isUnsubscribed()
Subscription
Subscription
is currently unsubscribed.isUnsubscribed
in interface Subscription
true
if this Subscription
is currently unsubscribed, false
otherwisepublic void add(Subscription s)
Subscription
to this SubscriptionList
if the SubscriptionList
is
not yet unsubscribed. If the SubscriptionList
is unsubscribed, add
will
indicate this by explicitly unsubscribing the new Subscription
as well.s
- the Subscription
to addpublic void remove(Subscription s)
public void unsubscribe()
Subscriber
.unsubscribe
in interface Subscription
public void clear()
public boolean hasSubscriptions()
true
if this composite is not unsubscribed and contains subscriptions.Copyright © 2017. All rights reserved.