Class Promise.Wrapper<W>

java.lang.Object
org.cometd.bayeux.Promise.Wrapper<W>
Type Parameters:
W - the type of the result value
All Implemented Interfaces:
Promise<W>
Enclosing interface:
Promise<C>

public static class Promise.Wrapper<W> extends Object implements Promise<W>

A wrapper for Promise instances.

  • Constructor Details

    • Wrapper

      public Wrapper(Promise<W> wrapped)
  • Method Details

    • getWrapped

      public Promise<W> getWrapped()
    • succeed

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

      Callback to invoke when the operation succeeds.

      Specified by:
      succeed in interface Promise<W>
      Parameters:
      result - the result
      See Also:
    • fail

      public void fail(Throwable failure)
      Description copied from interface: Promise

      Callback to invoke when the operation fails.

      Specified by:
      fail in interface Promise<W>
      Parameters:
      failure - the operation failure