Top Description Inners Fields Constructors Methods
rx.internal.operators

public final Class SingleFromEmitter<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 success value type
Imports
java.util.concurrent.atomic.AtomicBoolean, rx.*, .Single.OnSubscribe, rx.exceptions.Exceptions, rx.functions.*, rx.internal.subscriptions.*, rx.plugins.RxJavaHooks

Calls an action with a SingleEmitter instance for each individual subscribers that generates a terminal signal (eventually).

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final Action1<SingleEmitter<T>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Field Detail

producerback to summary
pack-priv final Action1<SingleEmitter<T>> producer

Constructor Detail

SingleFromEmitterback to summary
public SingleFromEmitter(Action1<SingleEmitter<T>> producer)

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 SingleFromEmitter.SingleEmitterImpl<T>

extends AtomicBoolean
implements SingleEmitter<T>, Subscription
Class Inheritance
All Implemented Interfaces
rx.Subscription, rx.SingleEmitter

Field Summary

Modifier and TypeField and Description
pack-priv final SingleSubscriber<? super T>
pack-priv final SequentialSubscription
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
isUnsubscribed()

Implements rx.Subscription.isUnsubscribed.

Indicates whether this Subscription is currently unsubscribed.
public void
onError(Throwable
the exception encountered by the Observable
t
)

Implements rx.SingleEmitter.onError.

Notifies the SingleSubscriber that the Single has experienced an error condition.
public void
onSuccess(T
the success value
t
)

Implements rx.SingleEmitter.onSuccess.

Notifies the SingleSubscriber that the Single has completed successfully with the given value.
public void
setCancellation(Cancellable
the cancellable resource, null is allowed
c
)

Implements rx.SingleEmitter.setCancellation.

Sets a Cancellable on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled.
public void
setSubscription(Subscription
the subscription, null is allowed
s
)

Implements rx.SingleEmitter.setSubscription.

Sets a Subscription on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled.
public void
unsubscribe()

Implements rx.Subscription.unsubscribe.

Stops the receipt of notifications on the Subscriber that was registered when this Subscription was received.
Inherited from java.util.concurrent.atomic.AtomicBoolean:
compareAndExchangecompareAndExchangeAcquirecompareAndExchangeReleasecompareAndSetgetgetAcquiregetAndSetgetOpaquegetPlainlazySetsetsetOpaquesetPlainsetReleasetoStringweakCompareAndSetweakCompareAndSetAcquireweakCompareAndSetPlainweakCompareAndSetReleaseweakCompareAndSetVolatile

Field Detail

actualback to summary
pack-priv final SingleSubscriber<? super T> actual
resourceback to summary
pack-priv final SequentialSubscription resource
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.concurrent.atomic.AtomicBoolean.serialVersionUID.

Constructor Detail

SingleEmitterImplback to summary
pack-priv SingleEmitterImpl(SingleSubscriber<? super T> actual)

Method Detail

isUnsubscribedback to summary
public boolean isUnsubscribed()

Implements rx.Subscription.isUnsubscribed.

Doc from rx.Subscription.isUnsubscribed.

Indicates whether this Subscription is currently unsubscribed.

Returns:boolean

true if this Subscription is currently unsubscribed, false otherwise

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

Implements rx.SingleEmitter.onError.

Doc from rx.SingleEmitter.onError.

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

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

Parameters
t:Throwable

the exception encountered by the Observable

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

Implements rx.SingleEmitter.onSuccess.

Doc from rx.SingleEmitter.onSuccess.

Notifies the SingleSubscriber that the Single has completed successfully with the given value.

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

Parameters
t:T

the success value

Annotations
@Override
setCancellationback to summary
public void setCancellation(Cancellable c)

Implements rx.SingleEmitter.setCancellation.

Doc from rx.SingleEmitter.setCancellation.

Sets a Cancellable on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled.

Parameters
c:Cancellable

the cancellable resource, null is allowed

Annotations
@Override
setSubscriptionback to summary
public void setSubscription(Subscription s)

Implements rx.SingleEmitter.setSubscription.

Doc from rx.SingleEmitter.setSubscription.

Sets a Subscription on this emitter; any previous Subscription or Cancellation will be unsubscribed/cancelled.

Parameters
s:Subscription

the subscription, null is allowed

Annotations
@Override
unsubscribeback to summary
public void unsubscribe()

Implements rx.Subscription.unsubscribe.

Doc from rx.Subscription.unsubscribe.

Stops the receipt of notifications on the Subscriber that was registered when this Subscription was received.

This allows deregistering an Subscriber before it has finished receiving all events (i.e. before onCompleted is called).

Annotations
@Override