public final class ErrorStream<O,T extends Throwable> extends Stream<O>
Since the stream retains the error in a final field, any this#subscribe(org.reactivestreams.Subscriber)
will replay the error. This is a "Cold" stream.
Create such stream with the provided factory, E.g.:
Streams.error(error).when(Throwable.class, log::error)
Will log:
1
2
3
4
complete
Constructor and Description |
---|
ErrorStream(T value) |
Modifier and Type | Method and Description |
---|---|
void |
subscribe(org.reactivestreams.Subscriber<? super O> s) |
String |
toString() |
adaptiveConsume, adaptiveConsumeOn, after, batchConsume, batchConsumeOn, broadcast, broadcastOn, broadcastTo, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, cache, cancelSubscription, capacity, cast, combine, concatMap, concatWith, consume, consume, consume, consume, consume, consumeLater, consumeOn, consumeOn, consumeOn, count, count, decode, defaultIfEmpty, dematerialize, dispatchOn, dispatchOn, dispatchOn, distinct, distinct, distinctUntilChanged, distinctUntilChanged, downstreamSubscription, elapsed, elementAt, elementAtOrDefault, encode, env, exists, fanIn, filter, filter, finallyDo, flatMap, getCapacity, getDispatcher, getEnvironment, getTimer, groupBy, ignoreError, ignoreError, isReactivePull, join, joinWith, keepAlive, last, lift, log, log, map, materialize, merge, mergeWith, nest, next, observe, observeCancel, observeComplete, observeError, observeStart, observeSubscribe, onErrorResumeNext, onErrorResumeNext, onErrorReturn, onErrorReturn, onOverflowBuffer, onOverflowBuffer, onOverflowDrop, partition, partition, process, recover, reduce, reduce, repeat, repeat, repeatWhen, requestWhen, retry, retry, retry, retry, retryWhen, sample, sample, sample, sample, sample, sample, sampleFirst, sampleFirst, sampleFirst, sampleFirst, sampleFirst, sampleFirst, scan, scan, skip, skip, skip, skipWhile, skipWhile, sort, sort, sort, sort, split, split, startWith, startWith, startWith, subscribe, subscribeOn, subscribeOn, subscribeOn, switchMap, take, take, take, takeWhile, tap, throttle, throttle, timeout, timeout, timeout, timeout, timestamp, toBlockingQueue, toBlockingQueue, toList, toList, unbounded, when, window, window, window, window, window, window, window, window, window, window, window, zip, zipWith, zipWith
Copyright © 2017. All rights reserved.