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 aCompletable
and aCompletableSource.Subscriber
and hence it has two responsibilities:- Subscribe to the
Completable
on which this operator is applied. - Accept a
CompletableSource.Subscriber
that subscribes to this operator.
Function
that takes aCompletableSource.Subscriber
and returns aCompletableSource.Subscriber
. TheCompletableSource.Subscriber
that is passed to thisFunction
is the one that has subscribed to this operator. TheCompletableSource.Subscriber
that is returned by thisFunction
is the one that should be used to subscribe to theCompletable
on which this operator is applied.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableSource.Subscriber
apply(CompletableSource.Subscriber subscriber)
Implementation of this operator.
-
-
-
Method Detail
-
apply
CompletableSource.Subscriber apply(CompletableSource.Subscriber subscriber)
Implementation of this operator. SeeCompletableOperator
for definition of an operator.- Specified by:
apply
in interfacejava.util.function.Function<CompletableSource.Subscriber,CompletableSource.Subscriber>
- Parameters:
subscriber
-CompletableSource.Subscriber
that subscribed to this operator.- Returns:
CompletableSource.Subscriber
that is used to subscribe to theCompletable
that this operator is applied to.
-
-