Class EmptySubscriptions
java.lang.Object
io.servicetalk.concurrent.internal.EmptySubscriptions
Utility methods for
PublisherSource.Subscription
s which don't deliver any data.-
Field Summary
Modifier and TypeFieldDescriptionstatic final PublisherSource.Subscription
APublisherSource.Subscription
with no associatedPublisherSource.Subscriber
that will throw on invalid demand.static final PublisherSource.Subscription
APublisherSource.Subscription
with no associatedPublisherSource.Subscriber
that will not throw on invalid demand. -
Method Summary
Modifier and TypeMethodDescriptionstatic PublisherSource.Subscription
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 Details
-
EMPTY_SUBSCRIPTION
APublisherSource.Subscription
with no associatedPublisherSource.Subscriber
that will throw on invalid demand. -
EMPTY_SUBSCRIPTION_NO_THROW
APublisherSource.Subscription
with no associatedPublisherSource.Subscriber
that will not throw on invalid demand.
-
-
Method Details
-
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
Create an emptyPublisherSource.Subscription
that will throw on invalid demand.- Returns:
- A
PublisherSource.Subscription
that will throw on invalid demand.
-