T
- the input value typeR
- the output value typepublic abstract class DeferredScalarObserver<T,R> extends DeferredScalarDisposable<R> implements Observer<T>
Modifier and Type | Field and Description |
---|---|
protected Disposable |
upstream
The upstream disposable.
|
downstream, value
Constructor and Description |
---|
DeferredScalarObserver(Observer<? super R> downstream)
Creates a DeferredScalarObserver instance and wraps a downstream Observer.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Dispose the resource, the operation should be idempotent.
|
void |
onComplete()
Notifies the Observer that the
Observable has finished sending push-based notifications. |
void |
onError(Throwable t)
Notifies the Observer that the
Observable has experienced an error condition. |
void |
onSubscribe(Disposable d)
Provides the Observer with the means of cancelling (disposing) the
connection (channel) with the Observable in both
synchronous (from within
Observer.onNext(Object) ) and asynchronous manner. |
clear, complete, complete, error, isDisposed, isEmpty, poll, requestFusion, tryDispose
offer, offer
accumulateAndGet, addAndGet, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, incrementAndGet, intValue, lazySet, longValue, set, toString, updateAndGet, weakCompareAndSet
byteValue, shortValue
protected Disposable upstream
public void onSubscribe(Disposable d)
Observer
Observer.onNext(Object)
) and asynchronous manner.onSubscribe
in interface Observer<T>
d
- the Disposable instance whose Disposable.dispose()
can
be called anytime to cancel the connectionpublic void onError(Throwable t)
Observer
Observable
has experienced an error condition.
If the Observable
calls this method, it will not thereafter call Observer.onNext(T)
or
Observer.onComplete()
.
public void onComplete()
Observer
Observable
has finished sending push-based notifications.
The Observable
will not call this method if it calls Observer.onError(java.lang.Throwable)
.
onComplete
in interface Observer<T>
public void dispose()
Disposable
dispose
in interface Disposable
dispose
in class DeferredScalarDisposable<R>
Copyright © 2019. All rights reserved.