Class ExitCommand
java.lang.Object
org.dellroad.jct.core.simple.AbstractSimpleCommand
org.dellroad.jct.core.simple.command.ExitCommand
- All Implemented Interfaces:
SimpleCommand
A simple "exit" (or "quit") command.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
execute
(ConsoleSession<?, ?> session, String name, List<String> args) Execute this command in the current thread and return success or failure.Methods inherited from class org.dellroad.jct.core.simple.AbstractSimpleCommand
getHelpDetail, getHelpSummary, getUsage, printUsage
-
Constructor Details
-
ExitCommand
public ExitCommand()
-
-
Method Details
-
execute
public int execute(ConsoleSession<?, ?> session, String name, List<String> args) throws InterruptedExceptionDescription 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 sessionname
- the name under which this command was invokedargs
- 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
-