Top Inners Fields Constructors Methods
io.reactivex.internal.operators.completable

public final Class CompletableCreate

extends Completable
Class Inheritance
Imports
java.util.concurrent.atomic.AtomicReference, io.reactivex.*, io.reactivex.disposables.Disposable, io.reactivex.exceptions.Exceptions, io.reactivex.functions.Cancellable, io.reactivex.internal.disposables.*, io.reactivex.plugins.RxJavaPlugins

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final CompletableOnSubscribe

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
subscribeActual(CompletableObserver
the CompletableObserver instance, never null
observer
)

Implements abstract io.reactivex.Completable.subscribeActual.

Implement this method to handle the incoming CompletableObservers and perform the business logic in your operator.
Inherited from io.reactivex.Completable:
ambambArrayambWithandThenandThenandThenandThenandThenasblockingAwaitblockingAwaitblockingGetblockingGetcachecompletecomposeconcatconcatconcatconcatArrayconcatWithcreatedeferdelaydelaydelaydelaySubscriptiondelaySubscriptiondoAfterTerminatedoFinallydoOnCompletedoOnDisposedoOnErrordoOnEventdoOnSubscribedoOnTerminateerrorerrorfromActionfromCallablefromFuturefromMaybefromObservablefromPublisherfromRunnablefromSinglehideliftmaterializemergemergemergemergeArraymergeArrayDelayErrormergeDelayErrormergeDelayErrormergeDelayErrormergeWithneverobserveOnonErrorCompleteonErrorCompleteonErrorResumeNextonTerminateDetachrepeatrepeatrepeatUntilrepeatWhenretryretryretryretryretryretryWhenstartWithstartWithstartWithsubscribesubscribesubscribesubscribesubscribeOnsubscribeWithtakeUntiltesttesttimeouttimeouttimeouttimeouttimertimertotoFlowabletoMaybetoObservabletoSingletoSingleDefaultunsafeCreateunsubscribeOnusingusingwrap

Field Detail

sourceback to summary
pack-priv final CompletableOnSubscribe source

Constructor Detail

CompletableCreateback to summary
public CompletableCreate(CompletableOnSubscribe source)

Method Detail

subscribeActualback to summary
protected void subscribeActual(CompletableObserver observer)

Implements abstract io.reactivex.Completable.subscribeActual.

Doc from io.reactivex.Completable.subscribeActual.

Implement this method to handle the incoming CompletableObservers and perform the business logic in your operator.

There is no need to call any of the plugin hooks on the current Completable instance or the CompletableObserver; all hooks and basic safeguards have been applied by subscribe(CompletableObserver) before this method gets called.

Parameters
observer:CompletableObserver

the CompletableObserver instance, never null

Annotations
@Override
io.reactivex.internal.operators.completable back to summary

pack-priv final Class CompletableCreate.Emitter

extends AtomicReference<Disposable>
implements CompletableEmitter, Disposable
Class Inheritance
All Implemented Interfaces
io.reactivex.disposables.Disposable, io.reactivex.CompletableEmitter

Field Summary

Modifier and TypeField and Description
pack-priv final CompletableObserver
private static final long

Constructor Summary

AccessConstructor and Description
pack-priv

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.CompletableEmitter.isDisposed, io.reactivex.disposables.Disposable.isDisposed.

Returns true if the downstream disposed the sequence or the emitter was terminated via onError(Throwable), onComplete or a successful tryOnError(Throwable).
public void
onComplete()

Implements io.reactivex.CompletableEmitter.onComplete.

Signal the completion.
public void
onError(Throwable
the exception, not null
t
)

Implements io.reactivex.CompletableEmitter.onError.

Signal an exception.
public void
setCancellable(Cancellable
the cancellable resource, null is allowed
c
)

Implements io.reactivex.CompletableEmitter.setCancellable.

Sets a Cancellable on this emitter; any previous Disposable or Cancellable will be disposed/cancelled.
public void
setDisposable(Disposable
the disposable, null is allowed
d
)

Implements io.reactivex.CompletableEmitter.setDisposable.

Sets a Disposable on this emitter; any previous Disposable or Cancellable will be disposed/cancelled.
public String
toString()

Overrides java.util.concurrent.atomic.AtomicReference.toString.

Returns the String representation of the current value.
public boolean
tryOnError(Throwable
the throwable error to signal if possible
t
)

Implements io.reactivex.CompletableEmitter.tryOnError.

Attempts to emit the specified Throwable error if the downstream hasn't cancelled the sequence or is otherwise terminated, returning false if the emission is not allowed to happen due to lifecycle restrictions.
Inherited from java.util.concurrent.atomic.AtomicReference:
accumulateAndGetcompareAndExchangecompareAndExchangeAcquirecompareAndExchangeReleasecompareAndSetgetgetAcquiregetAndAccumulategetAndSetgetAndUpdategetOpaquegetPlainlazySetsetsetOpaquesetPlainsetReleaseupdateAndGetweakCompareAndSetweakCompareAndSetAcquireweakCompareAndSetPlainweakCompareAndSetReleaseweakCompareAndSetVolatile

Field Detail

downstreamback to summary
pack-priv final CompletableObserver downstream
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.concurrent.atomic.AtomicReference.serialVersionUID.

Constructor Detail

Emitterback to summary
pack-priv Emitter(CompletableObserver 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.CompletableEmitter.isDisposed, io.reactivex.disposables.Disposable.isDisposed.

Doc from io.reactivex.CompletableEmitter.isDisposed.

Returns true if the downstream disposed the sequence or the emitter was terminated via onError(Throwable), onComplete or a successful tryOnError(Throwable).

This method is thread-safe.

Returns:boolean

true if the downstream disposed the sequence or the emitter was terminated

Annotations
@Override
onCompleteback to summary
public void onComplete()

Implements io.reactivex.CompletableEmitter.onComplete.

Doc from io.reactivex.CompletableEmitter.onComplete.

Signal the completion.

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

Implements io.reactivex.CompletableEmitter.onError.

Doc from io.reactivex.CompletableEmitter.onError.

Signal an exception.

Parameters
t:Throwable

the exception, not null

Annotations
@Override
setCancellableback to summary
public void setCancellable(Cancellable c)

Implements io.reactivex.CompletableEmitter.setCancellable.

Doc from io.reactivex.CompletableEmitter.setCancellable.

Sets a Cancellable on this emitter; any previous Disposable or Cancellable will be disposed/cancelled.

Parameters
c:Cancellable

the cancellable resource, null is allowed

Annotations
@Override
setDisposableback to summary
public void setDisposable(Disposable d)

Implements io.reactivex.CompletableEmitter.setDisposable.

Doc from io.reactivex.CompletableEmitter.setDisposable.

Sets a Disposable on this emitter; any previous Disposable or Cancellable will be disposed/cancelled.

Parameters
d:Disposable

the disposable, null is allowed

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.util.concurrent.atomic.AtomicReference.toString.

Doc from java.util.concurrent.atomic.AtomicReference.toString.

Returns the String representation of the current value.

Returns:String

the String representation of the current value

Annotations
@Override
tryOnErrorback to summary
public boolean tryOnError(Throwable t)

Implements io.reactivex.CompletableEmitter.tryOnError.

Doc from io.reactivex.CompletableEmitter.tryOnError.

Attempts to emit the specified Throwable error if the downstream hasn't cancelled the sequence or is otherwise terminated, returning false if the emission is not allowed to happen due to lifecycle restrictions.

Unlike onError(Throwable), the RxJavaPlugins.onError is not called if the error could not be delivered.

History: 2.1.1 - experimental

Parameters
t:Throwable

the throwable error to signal if possible

Returns:boolean

true if successful, false if the downstream is not able to accept further events

Annotations
@Override