Top Description Inners Fields Constructors Methods
rx.internal.operators

public final Class CompletableFromEmitter

extends Object
implements OnSubscribe
Class Inheritance
All Implemented Interfaces
rx.Completable.OnSubscribe, rx.functions.Action1, rx.functions.Action, rx.functions.Function
Imports
java.util.concurrent.atomic.AtomicBoolean, rx.*, rx.exceptions.Exceptions, rx.functions.*, rx.internal.subscriptions.*, rx.plugins.RxJavaHooks

Allows push-based emission of terminal events to a CompletableSubscriber.

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<CompletableEmitter>

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<CompletableEmitter> producer

Constructor Detail

CompletableFromEmitterback to summary
public CompletableFromEmitter(Action1<CompletableEmitter> producer)

Method Detail

callback to summary
public void call(CompletableSubscriber t)

Implements rx.functions.Action1.call.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class CompletableFromEmitter.FromEmitter

extends AtomicBoolean
implements CompletableEmitter, Subscription
Class Inheritance
All Implemented Interfaces
rx.Subscription, rx.CompletableEmitter

Field Summary

Modifier and TypeField and Description
pack-priv final CompletableSubscriber
pack-priv final SequentialSubscription
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
isUnsubscribed()

Implements rx.Subscription.isUnsubscribed.

Indicates whether this Subscription is currently unsubscribed.
public void
onCompleted()

Implements rx.CompletableEmitter.onCompleted.

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

Implements rx.CompletableEmitter.onError.

Notifies the CompletableSubscriber that the Completable has experienced an error condition.
public void
setCancellation(Cancellable
the cancellable resource, null is allowed
c
)

Implements rx.CompletableEmitter.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.CompletableEmitter.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 CompletableSubscriber 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

FromEmitterback to summary
public FromEmitter(CompletableSubscriber 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
onCompletedback to summary
public void onCompleted()

Implements rx.CompletableEmitter.onCompleted.

Doc from rx.CompletableEmitter.onCompleted.

Notifies the CompletableSubscriber that the Completable 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 rx.CompletableEmitter.onError.

Doc from rx.CompletableEmitter.onError.

Notifies the CompletableSubscriber that the Completable has experienced an error condition.

If the Completable calls this method, it will not thereafter call onCompleted.

Parameters
t:Throwable

the exception encountered by the Observable

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

Implements rx.CompletableEmitter.setCancellation.

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

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