Top Description Inners Fields Constructors Methods
rx.internal.operators

public final Class SingleFromObservable<T>

extends Object
implements Single.OnSubscribe<T>
Class Inheritance
All Implemented Interfaces
rx.Single.OnSubscribe, rx.functions.Action1, rx.functions.Action, rx.functions.Function
Type Parameters
<T>
the value type
Imports
java.util.NoSuchElementException, rx.*, .Observable.OnSubscribe, rx.plugins.RxJavaHooks

Wrap an Observable.OnSubscribe and expose it as a Single.OnSubscribe.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final Observable.OnSubscribe<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sourceback to summary
pack-priv final Observable.OnSubscribe<T> source

Constructor Detail

SingleFromObservableback to summary
public SingleFromObservable(Observable.OnSubscribe<T> source)

Method Detail

callback to summary
public void call(SingleSubscriber<? super T> t)

Implements rx.functions.Action1.call.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class SingleFromObservable.WrapSingleIntoSubscriber<T>

extends Subscriber<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final SingleSubscriber<? super T>
pack-priv int
pack-priv static final int
pack-priv static final int
pack-priv static final int
pack-priv T

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
onCompleted()

Implements rx.Observer.onCompleted.

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

Implements rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.
public void
onNext(T
the item emitted by the Observable
t
)

Implements rx.Observer.onNext.

Provides the Observer with a new item to observe.
Inherited from rx.Subscriber:
addisUnsubscribedonStartrequestsetProducerunsubscribe

Field Detail

actualback to summary
pack-priv final SingleSubscriber<? super T> actual
stateback to summary
pack-priv int state
STATE_DONEback to summary
pack-priv static final int STATE_DONE
STATE_EMPTYback to summary
pack-priv static final int STATE_EMPTY
STATE_HAS_VALUEback to summary
pack-priv static final int STATE_HAS_VALUE
valueback to summary
pack-priv T value

Constructor Detail

WrapSingleIntoSubscriberback to summary
pack-priv WrapSingleIntoSubscriber(SingleSubscriber<? super T> actual)

Method Detail

onCompletedback to summary
public void onCompleted()

Implements rx.Observer.onCompleted.

Doc from rx.Observer.onCompleted.

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 e)

Implements rx.Observer.onError.

Doc from rx.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 onCompleted.

Parameters
e:Throwable

the exception encountered by the Observable

Annotations
@Override
onNextback to summary
public void onNext(T t)

Implements rx.Observer.onNext.

Doc from rx.Observer.onNext.

Provides the Observer with a new item to observe.

The Observable may call this method 0 or more times.

The Observable will not call this method again after it calls either onCompleted or onError.

Parameters
t:T

the item emitted by the Observable

Annotations
@Override