Interface FlowableEmitter<T>

    • Method Detail

      • setDisposable

        void setDisposable​(@Nullable
                           @Nullable Disposable d)
        Sets a Disposable on this emitter; any previous Disposable or Cancellable will be disposed/cancelled.

        This method is thread-safe.

        Parameters:
        d - the disposable, null is allowed
      • setCancellable

        void setCancellable​(@Nullable
                            @Nullable Cancellable c)
        Sets a Cancellable on this emitter; any previous Disposable or Cancellable will be disposed/cancelled.

        This method is thread-safe.

        Parameters:
        c - the Cancellable resource, null is allowed
      • requested

        long requested()
        The current outstanding request amount.

        This method is thread-safe.

        Returns:
        the current outstanding request amount
      • tryOnError

        boolean tryOnError​(@NonNull
                           @NonNull java.lang.Throwable t)
        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 Emitter.onError(Throwable), the RxjavaPlugins.onError is not called if the error could not be delivered.

        History: 2.1.1 - experimental

        Parameters:
        t - the throwable error to signal if possible
        Returns:
        true if successful, false if the downstream is not able to accept further events
        Since:
        2.2