T
- the value type to emitpublic interface MaybeEmitter<T>
MaybeObserver
that allows associating
a resource with it.
All methods are safe to call from multiple threads.
Calling onSuccess, onError or onComplete multiple times has no effect.
Modifier and Type | Method and Description |
---|---|
boolean |
isDisposed()
Returns true if the downstream cancelled the sequence.
|
void |
onComplete()
Signal the completion.
|
void |
onError(java.lang.Throwable t)
Signal an exception.
|
void |
onSuccess(T t)
Signal a success value.
|
void |
setCancellable(Cancellable c)
Sets a Cancellable on this emitter; any previous Disposable
or Cancellation will be unsubscribed/cancelled.
|
void |
setDisposable(Disposable s)
Sets a Disposable on this emitter; any previous Disposable
or Cancellation will be unsubscribed/cancelled.
|
void onError(@NonNull java.lang.Throwable t)
t
- the exception, not nullvoid onComplete()
void setDisposable(@Nullable Disposable s)
s
- the disposable, null is allowedvoid setCancellable(@Nullable Cancellable c)
c
- the cancellable resource, null is allowedboolean isDisposed()