T
- Type of items emitted by the Publisher
this operator is applied.R
- Type of items emitted by this operator.public interface PublisherOperator<T,R> extends java.util.function.Function<PublisherSource.Subscriber<? super R>,PublisherSource.Subscriber<? super T>>
Publisher
.
Logically an operator sits between a Publisher
and a PublisherSource.Subscriber
and hence it has two
responsibilities:
Publisher
on which this operator is applied.PublisherSource.Subscriber
that subscribes to this operator.Function
that takes a PublisherSource.Subscriber
and returns a
PublisherSource.Subscriber
. The PublisherSource.Subscriber
that is passed to this Function
is the one that has subscribed to
this operator. The PublisherSource.Subscriber
that is returned by this Function
is the one that should be used to
subscribe to the Publisher
on which this operator is applied.Modifier and Type | Method and Description |
---|---|
PublisherSource.Subscriber<? super T> |
apply(PublisherSource.Subscriber<? super R> subscriber)
Implementation of this operator.
|
PublisherSource.Subscriber<? super T> apply(PublisherSource.Subscriber<? super R> subscriber)
PublisherOperator
for definition of an operator.apply
in interface java.util.function.Function<PublisherSource.Subscriber<? super R>,PublisherSource.Subscriber<? super T>>
subscriber
- PublisherSource.Subscriber
that subscribed to this operator.PublisherSource.Subscriber
that is used to subscribe to the Publisher
that this operator is applied to.