public abstract class DisposableCompletableObserver extends java.lang.Object implements CompletableObserver, Disposable
CompletableObserver
that allows asynchronous cancellation by implementing Disposable.Constructor and Description |
---|
DisposableCompletableObserver() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Dispose the resource, the operation should be idempotent.
|
boolean |
isDisposed()
Returns true if this resource has been disposed.
|
protected void |
onStart()
Called once the single upstream Disposable is set via onSubscribe.
|
void |
onSubscribe(Disposable s)
Called once by the Completable to set a Disposable on this instance which
then can be used to cancel the subscription at any time.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onComplete, onError
public final void onSubscribe(Disposable s)
CompletableObserver
onSubscribe
in interface CompletableObserver
s
- the Disposable instance to call dispose on for cancellation, not nullprotected void onStart()
public final boolean isDisposed()
Disposable
isDisposed
in interface Disposable
public final void dispose()
Disposable
dispose
in interface Disposable