| Constructor and Description |
|---|
InterceptedAsyncResult() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
Object |
get() |
Object |
get(long timeout,
TimeUnit unit) |
Throwable |
getException()
set exception to be returned in ExecutionException
|
boolean |
isCancelled() |
boolean |
isDone() |
void |
setDone()
allow to create isDone to true.
|
void |
setException(Throwable exception1)
set exception to be returned in ExecutionException
|
void |
setResult(Object result1)
set result to be returned by Future..
|
public Throwable getException()
public void setException(Throwable exception1)
exception1 - exception to be returned in ExecutionExceptionpublic void setResult(Object result1)
result1 - the result to be returned .public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<Object>public Object get() throws InterruptedException, ExecutionException
get in interface Future<Object>InterruptedExceptionExecutionExceptionpublic Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<Object>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic void setDone()
Copyright © 2017–2018. All rights reserved.