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