Package io.servicetalk.concurrent.api
Class SequentialCompletableSubscriberFunction
- java.lang.Object
-
- io.servicetalk.concurrent.api.SequentialCompletableSubscriberFunction
-
- All Implemented Interfaces:
java.util.function.Function<CompletableSource.Subscriber,CompletableSource.Subscriber>
public final class SequentialCompletableSubscriberFunction extends java.lang.Object implements java.util.function.Function<CompletableSource.Subscriber,CompletableSource.Subscriber>
Allows multipleCompletableSource.Subscribers to be sequentially subscribed to aTestCompletable. Attempts to subscribe concurrently will throw an exception.
-
-
Constructor Summary
Constructors Constructor Description SequentialCompletableSubscriberFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableSource.Subscriberapply(CompletableSource.Subscriber subscriber)booleanisSubscribed()Returnstrueif aCompletableSource.Subscriberis currently active (has been subscribed, and not terminated), orfalseotherwise.CompletableSource.Subscribersubscriber()Returns the most recently subscribedCompletableSource.Subscriber.
-
-
-
Method Detail
-
apply
public CompletableSource.Subscriber apply(CompletableSource.Subscriber subscriber)
- Specified by:
applyin interfacejava.util.function.Function<CompletableSource.Subscriber,CompletableSource.Subscriber>
-
subscriber
@Nullable public CompletableSource.Subscriber subscriber()
Returns the most recently subscribedCompletableSource.Subscriber.- Returns:
- the most recently subscribed
CompletableSource.Subscriber.
-
isSubscribed
public boolean isSubscribed()
Returnstrueif aCompletableSource.Subscriberis currently active (has been subscribed, and not terminated), orfalseotherwise.- Returns:
trueif aCompletableSource.Subscriberis currently active (has been subscribed, and not terminated), orfalseotherwise.
-
-