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