Package hu.akarnokd.rxjava3.basetypes
Class NonoProcessor
- java.lang.Object
-
- hu.akarnokd.rxjava3.basetypes.Nono
-
- hu.akarnokd.rxjava3.basetypes.NonoProcessor
-
- All Implemented Interfaces:
Processor<java.lang.Void,java.lang.Void>,Publisher<java.lang.Void>,Subscriber<java.lang.Void>
public final class NonoProcessor extends Nono implements Processor<java.lang.Void,java.lang.Void>
A hot Nono that signals the terminal event to Subscribers.NonoProcessor is thread-safe and naturally serialized on its onXXX methods.
- Since:
- 0.12.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NonoProcessorcreate()Creates a NonoProcessor instance ready to receive events and Subscribers.java.lang.ThrowablegetThrowable()Returns the error that terminated this NonoProcessor ifhasThrowable()returns true.booleanhasComplete()Returns true if this NonoProcessor has completed normally.booleanhasSubscribers()Returns true if this NonoProcessor currently has Subscribers.booleanhasThrowable()Returns true if this NonoProcessor has terminated with an error.voidonComplete()voidonError(java.lang.Throwable t)voidonNext(java.lang.Void t)voidonSubscribe(Subscription s)protected voidsubscribeActual(Subscriber<? super java.lang.Void> s)Implement this method to signal the terminal events to the given subscriber.-
Methods inherited from class hu.akarnokd.rxjava3.basetypes.Nono
amb, ambArray, andThen, andThen, blockingAwait, blockingAwait, blockingSubscribe, blockingSubscribe, blockingSubscribe, bufferSize, cache, complete, compose, concat, concat, concat, concatArray, concatArrayDelayError, concatDelayError, concatDelayError, concatDelayError, create, defer, delay, delay, delaySubscription, delaySubscription, delaySubscription, doAfterTerminate, doFinally, doOnCancel, doOnComplete, doOnError, doOnRequest, doOnSubscribe, error, error, flatMap, fromAction, fromCompletable, fromFuture, fromFuture, fromMaybe, fromObservable, fromPublisher, fromSingle, getOnAssemblyHandler, hide, lift, mapError, merge, merge, merge, merge, mergeArray, mergeArray, mergeArrayDelayError, mergeArrayDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, never, observeOn, onAssembly, onErrorComplete, onErrorResumeNext, repeat, repeat, repeat, repeatWhen, retry, retry, retry, retryWhen, setOnAssemblyHandler, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeWith, takeUntil, test, test, timeout, timeout, timeout, timeout, timeout, timeout, timer, timer, to, toCompletable, toFlowable, toFuture, toMaybe, toObservable, toPerhaps, unsubscribeOn, using, using
-
-
-
-
Method Detail
-
create
public static NonoProcessor create()
Creates a NonoProcessor instance ready to receive events and Subscribers.- Returns:
- the new NonoProcessor instance
-
onSubscribe
public void onSubscribe(Subscription s)
- Specified by:
onSubscribein interfaceSubscriber<java.lang.Void>
-
onNext
public void onNext(java.lang.Void t)
- Specified by:
onNextin interfaceSubscriber<java.lang.Void>
-
onError
public void onError(java.lang.Throwable t)
- Specified by:
onErrorin interfaceSubscriber<java.lang.Void>
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfaceSubscriber<java.lang.Void>
-
subscribeActual
protected void subscribeActual(Subscriber<? super java.lang.Void> s)
Description copied from class:NonoImplement this method to signal the terminal events to the given subscriber.- Specified by:
subscribeActualin classNono- Parameters:
s- the downstream subscriber, not null
-
hasSubscribers
public boolean hasSubscribers()
Returns true if this NonoProcessor currently has Subscribers.- Returns:
- true if there are subscribers
-
hasComplete
public boolean hasComplete()
Returns true if this NonoProcessor has completed normally.- Returns:
- true if completed normally
-
hasThrowable
public boolean hasThrowable()
Returns true if this NonoProcessor has terminated with an error.- Returns:
- true if terminated with an error
- See Also:
getThrowable()
-
getThrowable
public java.lang.Throwable getThrowable()
Returns the error that terminated this NonoProcessor ifhasThrowable()returns true.- Returns:
- the error Throwable that terminated this NonoProcessor
-
-