Class StateClientCommand.StateCommandResult
java.lang.Object
za.co.wethinkcode.robots.server.clientCommands.ClientCommandResult
za.co.wethinkcode.robots.server.clientCommands.StateClientCommand.StateCommandResult
- All Implemented Interfaces:
CommandResult
- Enclosing class:
StateClientCommand
-
Constructor Summary
ConstructorsConstructorDescriptionStateCommandResult(ServerRobot target, WorldState worldState, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionGetter for the Client Command Type of this commandExplicitly forces Command Results to return a responseCodeGetter of the State command robot statevoidAllows us to write our output to diskMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface za.co.wethinkcode.robots.shared.CommandResult
toString
-
Constructor Details
-
StateCommandResult
public StateCommandResult(ServerRobot target, WorldState worldState, com.fasterxml.jackson.databind.ObjectMapper objectMapper) throws NoSuchRobotException - Throws:
NoSuchRobotException
-
-
Method Details
-
getRobotState
Getter of the State command robot state- Returns:
- the target robot's state
-
writeToDisk
public void writeToDisk()Allows us to write our output to disk -
getInternalResponseCode
Explicitly forces Command Results to return a responseCode- Returns:
- a response code
-
getImplementedClientCommands
Getter for the Client Command Type of this command- Specified by:
getImplementedClientCommandsin classClientCommandResult- Returns:
- what type of command this is
-
getMessage
- Specified by:
getMessagein classClientCommandResult- Returns:
- the result's message (useful for debugging)
-