-
- All Implemented Interfaces:
-
io.reactivex.rxjava3.core.Observer,io.reactivex.rxjava3.functions.Cancellable
public class QueueReleasingEmitterWrapper<T> implements Observer<T>, Cancellable
A convenience class to use in QueueOperation subclasses. It wraps the Emitter and QueueReleaseInterface and makes sure that the io.reactivex.rxjava3.disposables.Disposable it was subscribed to will finish and call release in either onComplete or onError in case of the wrapped emitter being unsubscribed / canceled.
-
-
Constructor Summary
Constructors Constructor Description QueueReleasingEmitterWrapper(ObservableEmitter<T> emitter, QueueReleaseInterface queueReleaseInterface)
-
Method Summary
Modifier and Type Method Description voidonComplete()voidonError(Throwable e)voidonSubscribe(Disposable d)voidonNext(T t)synchronized voidcancel()synchronized booleanisWrappedEmitterUnsubscribed()-
Methods inherited from class io.reactivex.rxjava3.core.Observer
onComplete, onError, onNext, onSubscribe -
Methods inherited from class io.reactivex.rxjava3.functions.Cancellable
cancel -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
QueueReleasingEmitterWrapper
QueueReleasingEmitterWrapper(ObservableEmitter<T> emitter, QueueReleaseInterface queueReleaseInterface)
-
-
Method Detail
-
onComplete
void onComplete()
-
onSubscribe
void onSubscribe(Disposable d)
-
cancel
synchronized void cancel()
-
isWrappedEmitterUnsubscribed
synchronized boolean isWrappedEmitterUnsubscribed()
-
-
-
-