Class ErrorCommandResult

java.lang.Object
za.co.wethinkcode.robots.server.clientCommands.ClientCommandResult
za.co.wethinkcode.robots.server.errors.ErrorCommandResult
All Implemented Interfaces:
CommandResult

public class ErrorCommandResult extends ClientCommandResult
Standard Error CommandResult that can be constructed anywhere
  • Constructor Details

    • ErrorCommandResult

      public ErrorCommandResult(InternalResponseCode responseCode, ImplementedClientCommands clientCommandSource, String message)
      Constructor for Error Command Result from an internal response code, source and message
      Parameters:
      responseCode - the internal response code of this error
      clientCommandSource - the command that produced this error
      message - the associated error message
    • ErrorCommandResult

      public ErrorCommandResult(ImplementedClientCommands clientCommandSource, String message)
      Constructor for Error Command Result from a command source source and message
      Parameters:
      clientCommandSource - the command that produced this error
      message - the associated error message
  • Method Details

    • getImplementedClientCommands

      public ImplementedClientCommands getImplementedClientCommands()
      Return the command that this result was evaluating
      Specified by:
      getImplementedClientCommands in class ClientCommandResult
      Returns:
      which command this is an evaluation of
    • getMessage

      public String getMessage()
      Specified by:
      getMessage in class ClientCommandResult
      Returns:
      the result's message (useful for debugging)
    • writeToDisk

      public void writeToDisk()
      Allows us to write our output to disk
    • getInternalResponseCode

      public InternalResponseCode getInternalResponseCode()
      Explicitly forces Command Results to return a responseCode
      Returns:
      a response code