-
- All Implemented Interfaces:
-
com.tds.common.reactor.Subscription
public final class SubscriptionList implements Subscription
-
-
Constructor Summary
Constructors Constructor Description SubscriptionList()Constructs an empty SubscriptionList. SubscriptionList(Array<Subscription> subscriptions)Constructs a SubscriptionList with the given initial child subscriptions. SubscriptionList(Subscription s)Constructs a SubscriptionList with the given initial child subscription.
-
Method Summary
Modifier and Type Method Description booleanisUnsubscribed()Indicates whether this {@code Subscription}is currently unsubscribed.voidadd(Subscription s)Adds a new Subscription to this {@code SubscriptionList}if the{@code SubscriptionList}isnot yet unsubscribed.voidremove(Subscription s)voidunsubscribe()Unsubscribe from all of the subscriptions in the list, which stops the receipt of notifications onthe associated {@code Subscriber}.-
-
Constructor Detail
-
SubscriptionList
SubscriptionList()
Constructs an empty SubscriptionList.
-
SubscriptionList
SubscriptionList(Array<Subscription> subscriptions)
Constructs a SubscriptionList with the given initial child subscriptions.- Parameters:
subscriptions- the array of subscriptions to start with
-
SubscriptionList
SubscriptionList(Subscription s)
Constructs a SubscriptionList with the given initial child subscription.- Parameters:
s- the initial subscription instance
-
-
Method Detail
-
isUnsubscribed
boolean isUnsubscribed()
Indicates whether this
{@code Subscription}is currently unsubscribed.
-
add
void add(Subscription s)
Adds a new Subscription to this
{@code SubscriptionList}if the{@code SubscriptionList}isnot yet unsubscribed. If the{@code SubscriptionList}is unsubscribed,{@code add}willindicate this by explicitly unsubscribing the new{@code Subscription}as well.- Parameters:
s- the Subscription to add
-
remove
void remove(Subscription s)
-
unsubscribe
void unsubscribe()
Unsubscribe from all of the subscriptions in the list, which stops the receipt of notifications onthe associated
{@code Subscriber}.
-
-
-
-