T
- the type of object passed back when the promise is completed
successfully via the setSuccess(Object)
method.public interface Promise<T>
Modifier and Type | Method and Description |
---|---|
boolean |
isComplete() |
void |
setFailure(Exception exception)
Called to indicate that the related operation failed in some way.
|
void |
setSuccess(T result)
Called to indicate that the related operation succeeded.
|
void setFailure(Exception exception) throws IllegalStateException
exception
- an indication of why the operation failed.IllegalStateException
- if the promise has already been completed.void setSuccess(T result) throws IllegalStateException
result
- an object that represents the result of the operation.
This can be passed back to the class that issued the promise.IllegalStateException
- if the promise has already been completed.boolean isComplete()
setSuccess(Object)
or the setFailure(Exception)
method being invoked).Copyright © 2015 International Business Machines Corporation. All rights reserved.