Top Description Fields Constructors Methods
io.reactivex.internal.operators.mixed

public final Class MaterializeSingleObserver<T>

extends Object
implements SingleObserver<T>, MaybeObserver<T>, CompletableObserver, Disposable
Class Inheritance
All Implemented Interfaces
io.reactivex.disposables.Disposable, io.reactivex.CompletableObserver, io.reactivex.MaybeObserver, io.reactivex.SingleObserver
Annotations
@Experimental
Type Parameters
<T>
the element type of the source
Imports
io.reactivex.*, io.reactivex.annotations.Experimental, io.reactivex.disposables.Disposable, io.reactivex.internal.disposables.DisposableHelper

A consumer that implements the consumer types of Maybe, Single and Completable and turns their signals into Notifications for a SingleObserver.
Since
2.2.4 - experimental

Field Summary

Modifier and TypeField and Description
pack-priv final SingleObserver<? super Notification<T>>
pack-priv Disposable

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
dispose()

Implements io.reactivex.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.
public boolean
isDisposed()

Implements io.reactivex.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.
public void
onComplete()

Implements io.reactivex.MaybeObserver.onComplete, io.reactivex.CompletableObserver.onComplete.

Called once the deferred computation completes normally.
public void
onError(Throwable
the exception encountered by the Single
e
)

Implements io.reactivex.SingleObserver.onError, io.reactivex.MaybeObserver.onError, io.reactivex.CompletableObserver.onError.

Notifies the SingleObserver that the Single 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.SingleObserver.onSubscribe, io.reactivex.MaybeObserver.onSubscribe, io.reactivex.CompletableObserver.onSubscribe.

Provides the SingleObserver with the means of cancelling (disposing) the connection (channel) with the Single in both synchronous (from within onSubscribe(Disposable) itself) and asynchronous manner.
public void
onSuccess(T
the item emitted by the Single
t
)

Implements io.reactivex.SingleObserver.onSuccess, io.reactivex.MaybeObserver.onSuccess.

Notifies the SingleObserver with a single item and that the Single has finished sending push-based notifications.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

downstreamback to summary
pack-priv final SingleObserver<? super Notification<T>> downstream
upstreamback to summary
pack-priv Disposable upstream

Constructor Detail

MaterializeSingleObserverback to summary
public MaterializeSingleObserver(SingleObserver<? super Notification<T>> downstream)

Method Detail

disposeback to summary
public void dispose()

Implements io.reactivex.disposables.Disposable.dispose.

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

Dispose the resource, the operation should be idempotent.

Annotations
@Override
isDisposedback to summary
public boolean isDisposed()

Implements io.reactivex.disposables.Disposable.isDisposed.

Doc from io.reactivex.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.

Returns:boolean

true if this resource has been disposed

Annotations
@Override
onCompleteback to summary
public void onComplete()

Implements io.reactivex.MaybeObserver.onComplete, io.reactivex.CompletableObserver.onComplete.

Doc from io.reactivex.MaybeObserver.onComplete.

Called once the deferred computation completes normally.

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

Implements io.reactivex.SingleObserver.onError, io.reactivex.MaybeObserver.onError, io.reactivex.CompletableObserver.onError.

Doc from io.reactivex.SingleObserver.onError.

Notifies the SingleObserver that the Single has experienced an error condition.

If the Single calls this method, it will not thereafter call onSuccess.

Parameters
e:Throwable

the exception encountered by the Single

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

Implements io.reactivex.SingleObserver.onSubscribe, io.reactivex.MaybeObserver.onSubscribe, io.reactivex.CompletableObserver.onSubscribe.

Doc from io.reactivex.SingleObserver.onSubscribe.

Provides the SingleObserver with the means of cancelling (disposing) the connection (channel) with the Single in both synchronous (from within onSubscribe(Disposable) itself) and asynchronous manner.

Parameters
d:Disposable

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

Annotations
@Override
onSuccessback to summary
public void onSuccess(T t)

Implements io.reactivex.SingleObserver.onSuccess, io.reactivex.MaybeObserver.onSuccess.

Doc from io.reactivex.SingleObserver.onSuccess.

Notifies the SingleObserver with a single item and that the Single has finished sending push-based notifications.

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

Parameters
t:T

the item emitted by the Single

Annotations
@Override