Package io.servicetalk.concurrent.api
Interface CompletableOperator
-
- All Superinterfaces:
java.util.function.Function<CompletableSource.Subscriber,CompletableSource.Subscriber>
public interface CompletableOperator extends java.util.function.Function<CompletableSource.Subscriber,CompletableSource.Subscriber>
An operator contract for aCompletable. Logically an operator sits between aCompletableand aCompletableSource.Subscriberand hence it has two responsibilities:- Subscribe to the
Completableon which this operator is applied. - Accept a
CompletableSource.Subscriberthat subscribes to this operator.
Functionthat takes aCompletableSource.Subscriberand returns aCompletableSource.Subscriber. TheCompletableSource.Subscriberthat is passed to thisFunctionis the one that has subscribed to this operator. TheCompletableSource.Subscriberthat is returned by thisFunctionis the one that should be used to subscribe to theCompletableon which this operator is applied.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableSource.Subscriberapply(CompletableSource.Subscriber subscriber)Implementation of this operator.
-
-
-
Method Detail
-
apply
CompletableSource.Subscriber apply(CompletableSource.Subscriber subscriber)
Implementation of this operator. SeeCompletableOperatorfor definition of an operator.- Specified by:
applyin interfacejava.util.function.Function<CompletableSource.Subscriber,CompletableSource.Subscriber>- Parameters:
subscriber-CompletableSource.Subscriberthat subscribed to this operator.- Returns:
CompletableSource.Subscriberthat is used to subscribe to theCompletablethat this operator is applied to.
-
-