Class SingleResultPromise<T>

java.lang.Object
io.datatree.Promise
services.moleculer.mongo.SingleResultPromise<T>
All Implemented Interfaces:
org.reactivestreams.Subscriber<T>

public class SingleResultPromise<T> extends io.datatree.Promise implements org.reactivestreams.Subscriber<T>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected T
     

    Fields inherited from class io.datatree.Promise

    future, root
  • Constructor Summary

    Constructors
    Constructor
    Description
    SingleResultPromise(org.reactivestreams.Publisher<T> publisher)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    void
    onNext(T value)
     
    void
    onSubscribe(org.reactivestreams.Subscription subscription)
     
    io.datatree.Promise
    thenWithResult(io.datatree.CheckedFunction<T> action)
     

    Methods inherited from class io.datatree.Promise

    all, all, catchError, catchError, complete, complete, complete, complete, complete, complete, complete, complete, complete, complete, complete, isDone, isRejected, isResolved, race, race, reject, reject, resolve, resolve, resolve, resolve, resolve, resolve, resolve, resolve, resolve, resolve, then, then, toCompletableFuture, toCompletableFuture, toTree, waitFor, waitFor, waitFor

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • value

      protected T value
  • Constructor Details

    • SingleResultPromise

      public SingleResultPromise(org.reactivestreams.Publisher<T> publisher)
  • Method Details

    • onSubscribe

      public void onSubscribe(org.reactivestreams.Subscription subscription)
      Specified by:
      onSubscribe in interface org.reactivestreams.Subscriber<T>
    • onNext

      public void onNext(T value)
      Specified by:
      onNext in interface org.reactivestreams.Subscriber<T>
    • onError

      public void onError(Throwable error)
      Specified by:
      onError in interface org.reactivestreams.Subscriber<T>
    • onComplete

      public void onComplete()
      Specified by:
      onComplete in interface org.reactivestreams.Subscriber<T>
    • thenWithResult

      public io.datatree.Promise thenWithResult(io.datatree.CheckedFunction<T> action)