| com.ericsson.research.trap.utils.Callback<T> |
Provides a generic callback mechanism to handle asynchronous callbacks, while allowing synchronous accesses of them.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Callback.SingleArgumentCallback<T> | Asynchronous callback interface. | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Like
get() but with a limited timer. | |||||||||||
Synchronous accessor for the callback.
| |||||||||||
Sets the function that will receive the callback.
| |||||||||||
Like get() but with a limited timer.
| timeout | The maximum time to wait. |
|---|
| InterruptedException | If the thread is interrupted while waiting for the callback. |
|---|
Synchronous accessor for the callback. Should not be used together with
setCallback(SingleArgumentCallback).
| InterruptedException | If the thread is interrupted while waiting for the callback. |
|---|
Sets the function that will receive the callback. The function will be called as soon as the callback value is ready.
| callback | The function to call |
|---|