T - Type of items emitted by the Publisher this operator is applied.R - Type of items emitted by this operator.public interface ScanWithMapper<T,R>
Publisher.scanWith(Supplier) operator.| Modifier and Type | Method and Description |
|---|---|
R |
mapOnComplete()
Invoked when a
PublisherSource.Subscriber.onComplete() is signal received, and maps the current state into an object of
type R which will be emitted downstream as PublisherSource.Subscriber.onNext(Object), followed by
PublisherSource.Subscriber.onComplete(). |
R |
mapOnError(Throwable cause)
Invoked when a
PublisherSource.Subscriber.onError(Throwable) is signal received, and maps the current state into an
object of type R which will be emitted downstream as PublisherSource.Subscriber.onNext(Object), followed by
PublisherSource.Subscriber.onComplete(). |
R |
mapOnNext(T next)
Invoked on each
PublisherSource.Subscriber.onNext(Object) signal and maps from type T to type R. |
boolean |
mapTerminal()
Invoked when a terminal signal is received and determines if an additional
PublisherSource.Subscriber.onNext(Object)
signal will be emitted downstream. |
@Nullable R mapOnNext(@Nullable T next)
PublisherSource.Subscriber.onNext(Object) signal and maps from type T to type R.next - The next element emitted from PublisherSource.Subscriber.onNext(Object).next.@Nullable R mapOnError(Throwable cause) throws Throwable
PublisherSource.Subscriber.onError(Throwable) is signal received, and maps the current state into an
object of type R which will be emitted downstream as PublisherSource.Subscriber.onNext(Object), followed by
PublisherSource.Subscriber.onComplete().
If this method throws the exception will be propagated downstream via PublisherSource.Subscriber.onError(Throwable).
This method is only invoked if mapTerminal() returned true.
cause - The cause from upstream PublisherSource.Subscriber.onError(Throwable).R which will be emitted downstream as PublisherSource.Subscriber.onNext(Object).Throwable - If an exception occurs, which will be propagated downstream via
PublisherSource.Subscriber.onError(Throwable).@Nullable R mapOnComplete()
PublisherSource.Subscriber.onComplete() is signal received, and maps the current state into an object of
type R which will be emitted downstream as PublisherSource.Subscriber.onNext(Object), followed by
PublisherSource.Subscriber.onComplete().
If this method throws the exception will be propagated downstream via PublisherSource.Subscriber.onError(Throwable).
This method is only invoked if mapTerminal() returned true.
R which will be emitted downstream as PublisherSource.Subscriber.onNext(Object).boolean mapTerminal()
PublisherSource.Subscriber.onNext(Object)
signal will be emitted downstream.true then the mapOnError(Throwable) or mapOnComplete()
will be invoked when their respective terminal signals are received. Otherwise neither
mapOnError(Throwable) nor mapOnComplete() will be invoked and any terminal signal will be
passed through directly (no mapping, no additional PublisherSource.Subscriber.onNext(Object)).