Class EchoCommand

java.lang.Object
org.dellroad.jct.core.simple.AbstractSimpleCommand
org.dellroad.jct.core.simple.command.EchoCommand
All Implemented Interfaces:
SimpleCommand

public class EchoCommand extends AbstractSimpleCommand
A simple "echo" command.
  • Constructor Details

    • EchoCommand

      public EchoCommand()
  • Method Details

    • execute

      public int execute(ConsoleSession<?,?> session, String name, List<String> args) throws InterruptedException
      Description copied from interface: SimpleCommand
      Execute this command in the current thread and return success or failure.

      In the failure case, some error information should be written to standard error.

      Parameters:
      session - associated session
      name - the name under which this command was invoked
      args - zero or more command arguments (does not include command name)
      Returns:
      zero if successful, non-zero error code if an error occurred
      Throws:
      InterruptedException - if execution is interrupted