class FutureAsyncCompletionHandler<T> extends java.lang.Object implements AsyncCompletionHandler<T>
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Throwable |
error |
private java.util.concurrent.CountDownLatch |
latch |
private T |
result |
| Constructor and Description |
|---|
FutureAsyncCompletionHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
completed(T result)
Invoked when an operation has completed.
|
void |
failed(java.lang.Throwable t)
Invoked when an operation fails.
|
private T |
get(java.lang.String prefix) |
void |
getOpen() |
T |
getRead() |
void |
getWrite() |
private final java.util.concurrent.CountDownLatch latch
private volatile T result
private volatile java.lang.Throwable error
public void completed(T result)
AsyncCompletionHandlercompleted in interface AsyncCompletionHandler<T>result - the result of the completed operationpublic void failed(java.lang.Throwable t)
AsyncCompletionHandlerfailed in interface AsyncCompletionHandler<T>t - the exception that describes the failurepublic void getOpen()
throws java.io.IOException
java.io.IOExceptionpublic void getWrite()
throws java.io.IOException
java.io.IOExceptionpublic T getRead() throws java.io.IOException
java.io.IOExceptionprivate T get(java.lang.String prefix) throws java.io.IOException
java.io.IOException