Top Description Fields Constructors Methods
io.reactivex.internal.observers

public abstract Class DeferredScalarObserver<T, R>

extends DeferredScalarDisposable<R>
implements Observer<T>
Class Inheritance
All Implemented Interfaces
io.reactivex.Observer
Type Parameters
<T>
the input value type
<R>
the output value type
Imports
io.reactivex.Observer, io.reactivex.disposables.Disposable, io.reactivex.internal.disposables.DisposableHelper

A fuseable Observer that can generate 0 or 1 resulting value.

Field Summary

Modifier and TypeField and Description
private static final long
protected Disposable
upstream

The upstream disposable.

Inherited from io.reactivex.internal.observers.DeferredScalarDisposable:
DISPOSEDdownstreamFUSED_CONSUMEDFUSED_EMPTYFUSED_READYTERMINATEDvalue

Constructor Summary

AccessConstructor and Description
public
DeferredScalarObserver(Observer<? super R>
the downstream subscriber, not null (not verified)
downstream
)

Creates a DeferredScalarObserver instance and wraps a downstream Observer.

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Overrides io.reactivex.internal.observers.DeferredScalarDisposable.dispose.

Implements io.reactivex.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.
public void
onComplete()

Implements io.reactivex.Observer.onComplete.

Notifies the Observer that the Observable has finished sending push-based notifications.
public void
onError(Throwable
the exception encountered by the Observable
t
)

Implements io.reactivex.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.
public void
onSubscribe(Disposable
the Disposable instance whose Disposable#dispose() can be called anytime to cancel the connection
d
)

Implements io.reactivex.Observer.onSubscribe.

Provides the Observer with the means of cancelling (disposing) the connection (channel) with the Observable in both synchronous (from within onNext(Object)) and asynchronous manner.
Inherited from io.reactivex.internal.observers.DeferredScalarDisposable:
clearcompletecompleteerrorisDisposedisEmptypollrequestFusiontryDispose

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.reactivex.internal.observers.DeferredScalarDisposable.serialVersionUID.

upstreamback to summary
protected Disposable upstream

The upstream disposable.

Constructor Detail

DeferredScalarObserverback to summary
public DeferredScalarObserver(Observer<? super R> downstream)

Creates a DeferredScalarObserver instance and wraps a downstream Observer.

Parameters
downstream:Observer<? super R>

the downstream subscriber, not null (not verified)

Method Detail

disposeback to summary
public void dispose()

Overrides io.reactivex.internal.observers.DeferredScalarDisposable.dispose.

Implements io.reactivex.disposables.Disposable.dispose.

Doc from io.reactivex.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.

Annotations
@Override
onCompleteback to summary
public void onComplete()

Implements io.reactivex.Observer.onComplete.

Doc from io.reactivex.Observer.onComplete.

Notifies the Observer that the Observable has finished sending push-based notifications.

The Observable will not call this method if it calls onError.

Annotations
@Override
onErrorback to summary
public void onError(Throwable t)

Implements io.reactivex.Observer.onError.

Doc from io.reactivex.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.

If the Observable calls this method, it will not thereafter call onNext or onComplete.

Parameters
t:Throwable

the exception encountered by the Observable

Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Disposable d)

Implements io.reactivex.Observer.onSubscribe.

Doc from io.reactivex.Observer.onSubscribe.

Provides the Observer with the means of cancelling (disposing) the connection (channel) with the Observable in both synchronous (from within onNext(Object)) and asynchronous manner.

Parameters
d:Disposable

the Disposable instance whose Disposable#dispose() can be called anytime to cancel the connection

Annotations
@Override