Class SimpleCommandSupport.FoundCommand

java.lang.Object
org.dellroad.jct.core.simple.SimpleCommandSupport.FoundCommand
Enclosing class:
SimpleCommandSupport

public static class SimpleCommandSupport.FoundCommand extends Object
Represents a command line that has been parsed and the corresponding SimpleCommand found.
  • Constructor Details

    • FoundCommand

      public FoundCommand(SimpleCommand command, String name, List<String> parameters)
      Constructor.
      Parameters:
      command - the command to execute
      name - command name
      parameters - command parameters
      Throws:
      IllegalArgumentException - if any parameter is null
  • Method Details

    • getCommand

      public SimpleCommand getCommand()
    • getName

      public String getName()
    • getParameters

      public List<String> getParameters()
    • execute

      public int execute(ConsoleSession<?,?> session) throws InterruptedException
      Execute this command.
      Parameters:
      session - current session
      Returns:
      zero if successful, non-zero error code if an error occurred
      Throws:
      InterruptedException - if the current thread is interrupted