-
- All Implemented Interfaces:
-
io.reactivex.Observer,io.reactivex.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.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()-
-
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()
-
-
-
-