public final class CommandProcessor
extends java.lang.Object
StateMachine.StateMachine| Constructor and Description |
|---|
CommandProcessor(StateMachine machine,
java.util.function.Consumer<java.lang.String> handler)
creates a new command processor from a
StateMachine. |
| Modifier and Type | Method and Description |
|---|---|
void |
start()
starts the processor
|
void |
stop()
stops the processor.
|
public CommandProcessor(StateMachine machine, java.util.function.Consumer<java.lang.String> handler)
StateMachine. It hooks
directly into the command queue of that StateMachine and handles
each command through a defined handling routine.machine - the state machine to process commands for. may not be
nullhandler - a handler function defining the way each command is handled.
may not be nulljava.lang.NullPointerException - a parameter is nullStateMachineCopyright © 2018. All Rights Reserved.