Class ExternalCommandSwitcher
java.lang.Object
za.co.wethinkcode.robots.server.commands.ExternalCommandSwitcher
The Command Switcher class more elegantly responds to incoming command requests in a polymorphic way.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondefineCommand(String input, ClientID id) Take in the raw string input from a client and return out anExternalCommand
-
Constructor Details
-
ExternalCommandSwitcher
public ExternalCommandSwitcher()
-
-
Method Details
-
defineCommand
Take in the raw string input from a client and return out anExternalCommand- Parameters:
input- raw string input from client- Returns:
- the Unexecuted Command associated with this input
- Throws:
UnsupportedRobotWorldCommand- if the input fails to parse correctly
-