public final class NbpSubscriberResourceWrapper<T,R> extends java.util.concurrent.atomic.AtomicReference<java.lang.Object> implements NbpObservable.NbpSubscriber<T>, Disposable
| Constructor and Description |
|---|
NbpSubscriberResourceWrapper(NbpObservable.NbpSubscriber<? super T> actual,
Consumer<? super R> disposer) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Dispose the resource, the operation should be idempotent.
|
void |
onComplete() |
void |
onError(java.lang.Throwable t) |
void |
onNext(T t) |
void |
onSubscribe(Disposable s) |
void |
setResource(R resource) |
public NbpSubscriberResourceWrapper(NbpObservable.NbpSubscriber<? super T> actual, Consumer<? super R> disposer)
public void onSubscribe(Disposable s)
onSubscribe in interface NbpObservable.NbpSubscriber<T>public void onNext(T t)
onNext in interface NbpObservable.NbpSubscriber<T>public void onError(java.lang.Throwable t)
onError in interface NbpObservable.NbpSubscriber<T>public void onComplete()
onComplete in interface NbpObservable.NbpSubscriber<T>public void dispose()
Disposabledispose in interface Disposablepublic void setResource(R resource)