Class Results

java.lang.Object
com.tibco.ep.testing.framework.Results

public final class Results extends Object
Result from an administration command
  • Constructor Details

    • Results

      Results(String serviceName, String command, String target, Map<String,String> parameters, List<com.tibco.ep.dtm.management.DtmResults> results, List<Message> statuses, int returnCode, List<Message> errors)
      Constructor
      Parameters:
      serviceName - service name
      command - command
      target - target
      parameters - command parameters
      results - list of results
      statuses - lists of statuses
      returnCode - return code
      errors - list of errors
  • Method Details

    • getCommandResults

      public List<com.tibco.ep.dtm.management.DtmResults> getCommandResults()

      Get all results

      Returns:
      List of results. If no results, list will be of zero length.
    • returnCode

      public int returnCode()

      Return the return code of the command

      • DtmCommand.COMMAND_SUCCEEDED - Return code indicating command succeeded
      • DtmCommand.COMMAND_CANCELED - Return code indicating command was canceled
      • DtmCommand.COMMAND_WAIT_TIMEDOUT - Return code indicating command wait timed out
      Returns:
      return code
    • getErrorMessages

      public List<Message> getErrorMessages()

      Return the error messages of the command

      Returns:
      List of error messages. If no errors, list will be of zero length.
    • getCommandStatusMessages

      public List<Message> getCommandStatusMessages()

      Get list of status messages

      Returns:
      List of status messages. If no errors, list will be of zero length.
    • toString

      public String toString()

      Convert results set to a simple string

      Overrides:
      toString in class Object
      Returns:
      results set
    • prettyPrint

      public String prettyPrint()
      Pretty print the service name, command, parameters, return code, status messages, error messages, and results.
      Returns:
      Formatted results.
    • toDtmResults

      @Deprecated public Optional<com.tibco.ep.dtm.management.DtmResults> toDtmResults()
      Deprecated.
      Warning: this method excludes results when the command returns more than one result set use getCommandResults() instead

      Convert last results set to DtmResults

      Returns:
      results set
    • error

      @Deprecated public String error()
      Deprecated.
      Warning: this method excludes errors when the command returns more than one error use getErrorMessages() instead

      Return the last error message of the command

      Returns:
      error message - null on no error
    • getStatusMessages

      @Deprecated public Optional<List<String>> getStatusMessages()
      Deprecated.
      Warning: this method excludes the source of each status use getCommandStatusMessages() instead

      Get list of status messages

      Returns:
      list of status messages