public interface Future
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addListener(FutureListener listener)
add future listener , when task is success,failure, timeout, cancel, it will be called
|
boolean |
cancel()
cancle the task
|
Exception |
getException()
if task is done or cancle, return the exception
|
Object |
getValue()
if task is success, return the result.
|
boolean |
isCancelled()
task cancelled
|
boolean |
isDone()
task is complete : normal or exception
|
boolean |
isSuccess()
isDone() & normal
|
boolean cancel()
boolean isCancelled()
boolean isDone()
boolean isSuccess()
Object getValue()
Exception - when timeout, cancel, onFailureException getException()
void addListener(FutureListener listener)
listener - Copyright © 2017. All rights reserved.