java.io.Closeable, java.lang.AutoCloseable, Callback, Callback.NonBlockingpublic class SharedBlockingCallback.Blocker extends java.lang.Object implements Callback.NonBlocking, java.io.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.Nested, Callback.NonBlocking| Modifier | Constructor | Description |
|---|---|---|
protected |
Blocker() |
| Modifier and Type | Method | 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(java.lang.Throwable cause) |
Callback invoked when the operation fails.
|
void |
succeeded() |
Callback invoked when the operation completes.
|
java.lang.String |
toString() |
isNonBlockingpublic void succeeded()
CallbackCallback invoked when the operation completes.
succeeded in interface CallbackCallback.failed(Throwable)public void failed(java.lang.Throwable cause)
CallbackCallback invoked when the operation fails.
public void block()
throws java.io.IOException
java.io.IOException - if exception was caught during blocking, or callback was cancelledpublic void close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 1995–2018 Webtide. All rights reserved.