T
- the input and output value typepublic final class DirectProcessor<T> extends FluxProcessor<T,T> implements Receiver, MultiProducer
This implementation signals an IllegalStateException if a Subscriber is not ready to receive a value due to not requesting enough.
The implementation ignores Subscriptions set via onSubscribe.
A terminated DirectProcessor will emit the terminal signal to late subscribers.
UNSPECIFIED
Modifier and Type | Method and Description |
---|---|
static <E> DirectProcessor<E> |
create()
Create a new
DirectProcessor |
long |
downstreamCount()
the number of downstream receivers
|
Iterator<?> |
downstreams()
the connected data receivers
|
Throwable |
getError()
Current error if any, default to null
|
long |
getPrefetch()
The prefetch configuration of the
Flux |
boolean |
hasCompleted() |
boolean |
hasDownstreams()
Has any Subscriber attached to this multi-producer ?
|
boolean |
hasError() |
boolean |
isStarted()
Has this upstream started or "onSubscribed" ?
|
boolean |
isTerminated()
Has this upstream finished or "completed" / "failed" ?
|
void |
onComplete() |
void |
onError(Throwable t) |
void |
onNext(T t) |
void |
onSubscribe(Subscription s) |
void |
subscribe(Subscriber<? super T> s) |
Object |
upstream()
Return the direct source of data, Supports reference.
|
connect, connectSink, connectSink, getCapacity, serialize, switchOnNext, wrap
all, any, as, awaitOnSubscribe, blockFirst, blockFirst, blockFirstMillis, blockLast, blockLast, blockLastMillis, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferTimeout, bufferTimeout, bufferTimeoutMillis, bufferTimeoutMillis, bufferTimeoutMillis, bufferUntil, bufferUntil, bufferWhile, cache, cache, cache, cache, cancelOn, cast, checkpoint, checkpoint, collect, collect, collectList, collectMap, collectMap, collectMap, collectMultimap, collectMultimap, collectMultimap, collectSortedList, collectSortedList, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, compose, concat, concat, concat, concat, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatMap, concatMap, concatMapDelayError, concatMapDelayError, concatMapDelayError, concatMapIterable, concatMapIterable, concatWith, count, create, create, defaultIfEmpty, defer, delay, delayElements, delayElementsMillis, delayElementsMillis, delayMillis, delayMillis, delaySubscription, delaySubscription, delaySubscriptionMillis, delaySubscriptionMillis, dematerialize, distinct, distinct, distinctUntilChanged, distinctUntilChanged, doAfterTerminate, doFinally, doOnCancel, doOnComplete, doOnEach, doOnError, doOnError, doOnError, doOnNext, doOnRequest, doOnSubscribe, doOnTerminate, elapsed, elapsed, elementAt, elementAt, empty, error, error, filter, firstEmitting, firstEmitting, firstEmittingWith, flatMap, flatMap, flatMap, flatMap, flatMap, flatMapIterable, flatMapIterable, flatMapSequential, flatMapSequential, flatMapSequential, flatMapSequential, from, fromArray, fromIterable, fromStream, generate, generate, generate, groupBy, groupBy, groupBy, groupBy, groupJoin, handle, hasElement, hasElements, hide, ignoreElements, interval, interval, intervalMillis, intervalMillis, intervalMillis, intervalMillis, join, just, just, last, last, limitRate, log, log, log, log, map, mapError, mapError, mapError, materialize, merge, merge, merge, merge, merge, merge, merge, mergeSequential, mergeSequential, mergeSequential, mergeSequential, mergeSequential, mergeSequential, mergeWith, never, next, ofType, onAssembly, onAssembly, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureDrop, onBackpressureDrop, onBackpressureError, onBackpressureLatest, onErrorResumeWith, onErrorResumeWith, onErrorResumeWith, onErrorReturn, onErrorReturn, onErrorReturn, onTerminateDetach, parallel, parallel, parallel, publish, publish, publish, publish, publishNext, publishOn, publishOn, publishOn, range, reduce, reduce, reduceWith, repeat, repeat, repeat, repeat, repeatWhen, replay, replay, replay, replay, replayMillis, replayMillis, retry, retry, retry, retry, retryWhen, sample, sample, sampleFirst, sampleFirst, sampleFirstMillis, sampleMillis, sampleTimeout, sampleTimeout, scan, scan, scanWith, share, single, single, singleOrEmpty, skip, skip, skipLast, skipMillis, skipMillis, skipUntil, skipUntilOther, skipWhile, sort, sort, startWith, startWith, startWith, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeWith, switchIfEmpty, switchMap, switchMap, switchOnError, switchOnError, switchOnError, switchOnNext, switchOnNext, take, take, takeLast, takeMillis, takeMillis, takeUntil, takeUntilOther, takeWhile, then, then, then, thenEmpty, thenMany, thenMany, timeout, timeout, timeout, timeout, timeout, timeoutMillis, timeoutMillis, timeoutMillis, timeoutMillis, timestamp, timestamp, toIterable, toIterable, toIterable, toStream, toStream, toString, transform, using, using, window, window, window, window, window, window, window, window, windowMillis, windowMillis, windowMillis, windowMillis, windowMillis, windowTimeout, windowTimeoutMillis, windowTimeoutMillis, windowUntil, windowUntil, windowUntil, windowWhile, windowWhile, withLatestFrom, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipWith, zipWith, zipWith, zipWith, zipWithIterable, zipWithIterable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
expectedFromUpstream, getPending, isCancelled, limit, requestedFromDownstream
public static <E> DirectProcessor<E> create()
DirectProcessor
E
- Type of processed signalspublic long getPrefetch()
Flux
Flux
getPrefetch
in class Flux<T>
Flux
, -1L if unspecifiedpublic void onSubscribe(Subscription s)
onSubscribe
in interface Subscriber<T>
public void onNext(T t)
onNext
in interface Subscriber<T>
public void onError(Throwable t)
onError
in interface Subscriber<T>
public void onComplete()
onComplete
in interface Subscriber<T>
public void subscribe(Subscriber<? super T> s)
public boolean isStarted()
Trackable
public boolean isTerminated()
Trackable
isTerminated
in interface Trackable
public Iterator<?> downstreams()
MultiProducer
downstreams
in interface MultiProducer
public long downstreamCount()
MultiProducer
downstreamCount
in interface MultiProducer
public boolean hasDownstreams()
MultiProducer
hasDownstreams
in interface MultiProducer
public boolean hasCompleted()
public boolean hasError()
public Throwable getError()
Trackable