Class DumpCommandResult

java.lang.Object
za.co.wethinkcode.robots.server.serverCommands.DumpCommandResult
All Implemented Interfaces:
CommandResult

public class DumpCommandResult extends Object implements CommandResult
Evaluated Result of a Dump Command
  • Constructor Details

    • DumpCommandResult

      public DumpCommandResult(Map<String,Argument> args, WorldState worldState, InternalResponseCode internalResponseCode)
      Standard Constructor for Dump Command Result
      Parameters:
      args - required arguments for Dump Command Result
      worldState - current worldState
      internalResponseCode - responseCode of the Evaluated Dump Command
  • Method Details

    • writeToDisk

      public void writeToDisk()
      Allows us to write our output to disk
      Specified by:
      writeToDisk in interface CommandResult
    • toJson

      public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
      Jackson serialisation string
      Returns:
      JSON string
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • getInternalResponseCode

      public InternalResponseCode getInternalResponseCode()
      Explicitly forces Command Results to return a responseCode
      Specified by:
      getInternalResponseCode in interface CommandResult
      Returns:
      a response code