Package io.servicetalk.concurrent.api
Interface CompletableOperator
- All Superinterfaces:
Function<CompletableSource.Subscriber,
CompletableSource.Subscriber>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface CompletableOperator
extends Function<CompletableSource.Subscriber,CompletableSource.Subscriber>
An operator contract for a
Completable
.
Logically an operator sits between a Completable
and a CompletableSource.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 a CompletableSource.Subscriber
and returns a
CompletableSource.Subscriber
.
The CompletableSource.Subscriber
that is passed to this Function
is the one that has subscribed to this operator.
The CompletableSource.Subscriber
that is returned by this Function
is the one that should be used to subscribe to the
Completable
on which this operator is applied.-
Method Summary
Modifier and TypeMethodDescriptionapply
(CompletableSource.Subscriber subscriber) Implementation of this operator.
-
Method Details
-
apply
Implementation of this operator. SeeCompletableOperator
for definition of an operator.- Specified by:
apply
in interfaceFunction<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.
-