Class MaybeFromFuture<T>

java.lang.Object
io.reactivex.rxjava3.core.Maybe<T>
io.reactivex.rxjava3.internal.operators.maybe.MaybeFromFuture<T>
Type Parameters:
T - the value type
All Implemented Interfaces:
MaybeSource<T>

public final class MaybeFromFuture<T> extends Maybe<T>
Waits until the source Future completes or the wait times out; treats a null result as indication to signal onComplete instead of onSuccess.
  • Field Details

    • future

      final Future<? extends T> future
    • timeout

      final long timeout
    • unit

      final TimeUnit unit
  • Constructor Details

    • MaybeFromFuture

      public MaybeFromFuture(Future<? extends T> future, long timeout, TimeUnit unit)
  • Method Details

    • subscribeActual

      protected void subscribeActual(MaybeObserver<? super T> observer)
      Description copied from class: Maybe
      Implement this method in subclasses to handle the incoming MaybeObservers.

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

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