public class SharedBlockingCallback.Blocker extends Object implements Callback.NonBlocking, Closeable
Implements Callback.NonBlocking
because calls to this
callback do not blocak, rather they wakeup the thread that is blocked
in block()
Callback.Adapter, Callback.NonBlocking
Modifier | Constructor and Description |
---|---|
protected |
Blocker() |
Modifier and Type | Method and Description |
---|---|
void |
block()
Block until the Callback has succeeded or failed and after the return leave in the state to allow reuse.
|
void |
close()
Check the Callback has succeeded or failed and after the return leave in the state to allow reuse.
|
void |
failed(Throwable cause)
Callback invoked when the operation fails.
|
void |
succeeded()
Callback invoked when the operation completes.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isNonBlocking
public void succeeded()
Callback
Callback invoked when the operation completes.
succeeded
in interface Callback
Callback.failed(Throwable)
public void failed(Throwable cause)
Callback
Callback invoked when the operation fails.
public void block() throws IOException
IOException
- if exception was caught during blocking, or callback was cancelledpublic void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 1995-2016 Webtide. All Rights Reserved.