Class SingleFromSupplier<T>

  • Type Parameters:
    T - the value type returned
    All Implemented Interfaces:
    SingleSource<T>

    public final class SingleFromSupplier<T>
    extends Single<T>
    Calls a supplier and emits its value or exception to the incoming SingleObserver.
    Since:
    3.0.0
    • Field Detail

      • supplier

        final Supplier<? extends T> supplier
    • Constructor Detail

      • SingleFromSupplier

        public SingleFromSupplier​(Supplier<? extends T> supplier)
    • Method Detail

      • subscribeActual

        protected void subscribeActual​(SingleObserver<? super T> observer)
        Description copied from class: Single
        Implement this method in subclasses to handle the incoming SingleObservers.

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

        Specified by:
        subscribeActual in class Single<T>
        Parameters:
        observer - the SingleObserver to handle, not null