ObservableEmitter

Represents an emitter for Observable source. See Emitter and ObservableCallbacks for more information.

Properties

Link copied to clipboard
abstract val isDisposed: Boolean

Functions

Link copied to clipboard
operator fun <T> ValueCallback<T>.invoke(value: T)

Convenience method for ValueCallback.onNext

Link copied to clipboard
abstract fun onComplete()

Notifies the host (typically an Observer) about completion

Link copied to clipboard
abstract fun onError(error: Throwable)

Called when there is an exception occurred

Link copied to clipboard
abstract fun onNext(value: T)

Delivers values to the host (typically an Observer)

Link copied to clipboard
Link copied to clipboard
inline fun Emitter.setCancellable(crossinline cancellable: () -> Unit)
Link copied to clipboard
abstract fun setDisposable(disposable: Disposable?)

Sets a Disposable on this emitter, any existing Disposable will be replaced and disposed.

Link copied to clipboard
inline fun ErrorCallback.tryCatch(errorTransformer: (Throwable) -> Throwable = { it }, block: () -> Unit)
inline fun <T> ErrorCallback.tryCatch(block: () -> T, errorTransformer: (Throwable) -> Throwable = { it }, onSuccess: (T) -> Unit)