Allow configuring a command to be run on entering state#103
Allow configuring a command to be run on entering state#103
Conversation
d4c9754 to
a2cc083
Compare
There was a problem hiding this comment.
Maybe a guava MultiMap instead? Is there a reason we can't have multiple state commands for each state?
There was a problem hiding this comment.
getCommandForBinding() is here so it provides a more helpful error message
There was a problem hiding this comment.
What's the difference between this and just setting the map?
There was a problem hiding this comment.
What if we want to add more later
ca0d840 to
b2a5cef
Compare
| Command stateCommand = getCommandForBinding(commandEntry.getValue()); | ||
| stateCommands.put(commandEntry.getKey(), stateCommand); | ||
| } | ||
| } |
There was a problem hiding this comment.
This should probably take a MultiMap. I think there's a Multimaps.newMultiMap method which can convert a map to a multimap. Or you could just use https://github.com/FasterXML/jackson-datatypes-collections and have a Multimap in the config
| logger.debug("Starting stepper"); | ||
| stepper.start(); | ||
|
|
||
| autoCommand = commandStore.getCommand("AutoInit"); |
There was a problem hiding this comment.
You remove this here, but you never add it to the config
8b3da0e to
45d3543
Compare
Appears to be done
b90bcec to
fc0892c
Compare
No description provided.