public static class ReplicatedEntity.CommandHandlers$
extends java.lang.Object
CommandHandler defines how to react on a commands and optionally functions for other signals,
e.g. Termination messages if watch is used.
Note that you can have different handers based on current state by using
ReplicatedEntity.byStateCommandHandlerBuilder(java.lang.Class<State>).
| Modifier and Type | Field and Description |
|---|---|
static ReplicatedEntity.CommandHandlers$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
| Constructor and Description |
|---|
CommandHandlers$() |
| Modifier and Type | Method and Description |
|---|---|
<Command,Event,State> |
byState(java.util.function.Function<State,CommandHandler<Command,Event,State>> choice)
Select different handlers based on current state.
|
<Command,Event,State> |
command(java.util.function.Function<Command,Effect<Event,State>> commandHandler)
Convenience for simple commands that don't need the state and context.
|
<Command,Event,State> |
create(CommandToEffect<Command,Event,State> commandHandler) |
public static final ReplicatedEntity.CommandHandlers$ MODULE$
public <Command,Event,State> CommandHandler<Command,Event,State> create(CommandToEffect<Command,Event,State> commandHandler)
public <Command,Event,State> CommandHandler<Command,Event,State> command(java.util.function.Function<Command,Effect<Event,State>> commandHandler)
commandHandler - (undocumented)public <Command,Event,State> CommandHandler<Command,Event,State> byState(java.util.function.Function<State,CommandHandler<Command,Event,State>> choice)
choice - (undocumented)