Package io.servicetalk.concurrent.api
Interface ScanWithMapper<T,R>
- Type Parameters:
T
- Type of items emitted by thePublisher
this operator is applied.R
- Type of items emitted by this operator.
- All Known Subinterfaces:
ScanWithLifetimeMapper<T,
R>
Deprecated.
Provides the ability to transform (aka map) signals emitted via the
Publisher.scanWith(Supplier)
operator.-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Invoked when aPublisherSource.Subscriber.onComplete()
signal is received, and maps the current state into an object of typeScanWithMapper
which will be emitted downstream asPublisherSource.Subscriber.onNext(Object)
, followed byPublisherSource.Subscriber.onComplete()
.mapOnError
(Throwable cause) Deprecated.Invoked when aPublisherSource.Subscriber.onError(Throwable)
signal is received, and maps the current state into an object of typeScanWithMapper
which will be emitted downstream asPublisherSource.Subscriber.onNext(Object)
, followed byPublisherSource.Subscriber.onComplete()
.Deprecated.Invoked on eachPublisherSource.Subscriber.onNext(Object)
signal and maps from typeScanWithMapper
to typeScanWithMapper
.boolean
Deprecated.Invoked when a terminal signal is received and determines if an additionalPublisherSource.Subscriber.onNext(Object)
signal will be emitted downstream.
-
Method Details
-
mapOnNext
Deprecated.Invoked on eachPublisherSource.Subscriber.onNext(Object)
signal and maps from typeScanWithMapper
to typeScanWithMapper
.- Parameters:
next
- The next element emitted fromPublisherSource.Subscriber.onNext(Object)
.- Returns:
- The result of mapping
next
.
-
mapOnError
Deprecated.Invoked when aPublisherSource.Subscriber.onError(Throwable)
signal is received, and maps the current state into an object of typeScanWithMapper
which will be emitted downstream asPublisherSource.Subscriber.onNext(Object)
, followed byPublisherSource.Subscriber.onComplete()
.If this method throws the exception will be propagated downstream via
PublisherSource.Subscriber.onError(Throwable)
.This method is only invoked if
mapTerminal()
returnedtrue
.- Parameters:
cause
- The cause from upstreamPublisherSource.Subscriber.onError(Throwable)
.- Returns:
- An object of type
ScanWithMapper
which will be emitted downstream asPublisherSource.Subscriber.onNext(Object)
. - Throws:
Throwable
- If an exception occurs, which will be propagated downstream viaPublisherSource.Subscriber.onError(Throwable)
.
-
mapOnComplete
Deprecated.Invoked when aPublisherSource.Subscriber.onComplete()
signal is received, and maps the current state into an object of typeScanWithMapper
which will be emitted downstream asPublisherSource.Subscriber.onNext(Object)
, followed byPublisherSource.Subscriber.onComplete()
.If this method throws the exception will be propagated downstream via
PublisherSource.Subscriber.onError(Throwable)
.This method is only invoked if
mapTerminal()
returnedtrue
.- Returns:
- An object of type
ScanWithMapper
which will be emitted downstream asPublisherSource.Subscriber.onNext(Object)
.
-
mapTerminal
boolean mapTerminal()Deprecated.Invoked when a terminal signal is received and determines if an additionalPublisherSource.Subscriber.onNext(Object)
signal will be emitted downstream.- Returns:
- If this method returns
true
then themapOnError(Throwable)
ormapOnComplete()
will be invoked when their respective terminal signals are received. Otherwise neithermapOnError(Throwable)
normapOnComplete()
will be invoked and any terminal signal will be passed through directly (no mapping, no additionalPublisherSource.Subscriber.onNext(Object)
).
-
ScanMapper
.