- 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>
-
-
Field Summary
Fields inherited from interface org.cometd.bayeux.Promise
NOOP
-
Constructor Summary
Constructors
-
Method Summary
void
Callback to invoke when the operation fails.
void
Callback to invoke when the operation succeeds.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Details
-
-
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
Description copied from interface: Promise
Callback to invoke when the operation fails.
- Specified by:
fail
in interface Promise<W>
- Parameters:
failure
- the operation failure