Class Promise.Wrapper<W>

  • All Implemented Interfaces:
    Promise<W>
    Enclosing interface:
    Promise<C>

    public static class Promise.Wrapper<W>
    extends java.lang.Object
    implements Promise<W>
    • Constructor Detail

      • Wrapper

        public Wrapper​(Promise<W> promise)
    • Method Detail

      • succeeded

        public void succeeded​(W result)
        Description copied from interface: Promise

        Callback invoked when the operation completes.

        Specified by:
        succeeded in interface Promise<W>
        Parameters:
        result - the context
        See Also:
        Promise.failed(Throwable)
      • failed

        public void failed​(java.lang.Throwable x)
        Description copied from interface: Promise

        Callback invoked when the operation fails.

        Specified by:
        failed in interface Promise<W>
        Parameters:
        x - the reason for the operation failure
      • getPromise

        public Promise<W> getPromise()