Class EmptySubscriptions
- java.lang.Object
-
- io.servicetalk.concurrent.internal.EmptySubscriptions
-
public final class EmptySubscriptions extends java.lang.ObjectUtility methods forPublisherSource.Subscriptions which don't deliver any data.
-
-
Field Summary
Fields Modifier and Type Field Description static PublisherSource.SubscriptionEMPTY_SUBSCRIPTIONAPublisherSource.Subscriptionwith no associatedPublisherSource.Subscriberthat will throw on invalid demand.static PublisherSource.SubscriptionEMPTY_SUBSCRIPTION_NO_THROWAPublisherSource.Subscriptionwith no associatedPublisherSource.Subscriberthat will not throw on invalid demand.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PublisherSource.SubscriptionnewEmptySubscription()Create an emptyPublisherSource.Subscriptionthat will throw on invalid demand.static <T> PublisherSource.SubscriptionnewEmptySubscription(PublisherSource.Subscriber<T> subscriber)Create an emptyPublisherSource.Subscriptionthat will propagate an error to aPublisherSource.Subscriberupon invalid demand.
-
-
-
Field Detail
-
EMPTY_SUBSCRIPTION
public static final PublisherSource.Subscription EMPTY_SUBSCRIPTION
APublisherSource.Subscriptionwith no associatedPublisherSource.Subscriberthat will throw on invalid demand.
-
EMPTY_SUBSCRIPTION_NO_THROW
public static final PublisherSource.Subscription EMPTY_SUBSCRIPTION_NO_THROW
APublisherSource.Subscriptionwith no associatedPublisherSource.Subscriberthat will not throw on invalid demand.
-
-
Method Detail
-
newEmptySubscription
public static <T> PublisherSource.Subscription newEmptySubscription(PublisherSource.Subscriber<T> subscriber)
Create an emptyPublisherSource.Subscriptionthat will propagate an error to aPublisherSource.Subscriberupon invalid demand.- Type Parameters:
T- The type ofPublisherSource.Subscriber.- Parameters:
subscriber- The subscriber to propagate- Returns:
- An empty
PublisherSource.Subscriptionthat will propagate an error to aPublisherSource.Subscriberupon invalid demand.
-
newEmptySubscription
public static PublisherSource.Subscription newEmptySubscription()
Create an emptyPublisherSource.Subscriptionthat will throw on invalid demand.- Returns:
- A
PublisherSource.Subscriptionthat will throw on invalid demand.
-
-