public interface CallbackWrapper<T> extends AsyncCallback<T>
GraphStage stage instances and handle gracefully cases when stage is
not yet initialized or already finished.
While GraphStage has not initialized it adds all requests to list.
As soon as GraphStage is started it stops collecting requests (pointing to real callback
function) and run all the callbacks from the list
Supposed to be used by GraphStages that share call back to outer world
| Modifier and Type | Interface and Description |
|---|---|
static interface |
CallbackWrapper.CallbackState |
private static class |
CallbackWrapper.Initialized |
private static class |
CallbackWrapper.NotInitialized |
private static class |
CallbackWrapper.Stopped |
| Modifier and Type | Method and Description |
|---|---|
void |
initCallback(scala.Function1<T,scala.runtime.BoxedUnit> f) |
void |
invoke(T arg)
Dispatch an asynchronous notification.
|
void |
locked(scala.Function0<scala.runtime.BoxedUnit> body) |
void |
stopCallback(scala.Function1<T,scala.runtime.BoxedUnit> f) |
void stopCallback(scala.Function1<T,scala.runtime.BoxedUnit> f)
void initCallback(scala.Function1<T,scala.runtime.BoxedUnit> f)
void invoke(T arg)
AsyncCallbackinvoke in interface AsyncCallback<T>arg - (undocumented)void locked(scala.Function0<scala.runtime.BoxedUnit> body)