public interface StateMachineExecutor
extends net.kuujo.catalyst.util.concurrent.Context
| Modifier and Type | Method and Description |
|---|---|
default void |
close() |
StateMachineContext |
context()
Returns the state machine context.
|
<T extends Operation<Void>> |
register(Class<T> type,
Consumer<Commit<T>> callback)
Registers a void operation callback.
|
<T extends Operation<U>,U> |
register(Class<T> type,
Function<Commit<T>,U> callback)
Registers an operation callback.
|
StateMachineExecutor |
register(Function<Commit<? extends Operation<?>>,?> callback)
Registers a global operation callback.
|
StateMachineContext context()
StateMachineExecutor register(Function<Commit<? extends Operation<?>>,?> callback)
callback - The operation callback.NullPointerException - if callback is null<T extends Operation<Void>> StateMachineExecutor register(Class<T> type, Consumer<Commit<T>> callback)
T - The operation type.type - The operation type.callback - The operation callback.NullPointerException - if type or callback are null<T extends Operation<U>,U> StateMachineExecutor register(Class<T> type, Function<Commit<T>,U> callback)
T - The operation type.U - The operation output type.type - The operation type.callback - The operation callback.NullPointerException - if type or callback are nulldefault void close()
close in interface AutoCloseableclose in interface net.kuujo.catalyst.util.concurrent.ContextCopyright © 2013–2015. All rights reserved.