Class ExampleConsoleCommand
java.lang.Object
com.dianxin.tori.base.console.commands.AbstractConsoleCommand
com.dianxin.tori.base.console.commands.ExampleConsoleCommand
A concrete implementation example of a console command.
Triggers a graceful JVM shutdown sequence when the "stop" command is entered.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs the example shutdown command under the trigger keyword "stop". -
Method Summary
Methods inherited from class com.dianxin.tori.base.console.commands.AbstractConsoleCommand
getCommandLine, getLogger
-
Constructor Details
-
ExampleConsoleCommand
public ExampleConsoleCommand()Constructs the example shutdown command under the trigger keyword "stop".
-
-
Method Details
-
execute
Executes the shutdown logic, providing a hook to safely clean up open resources.- Specified by:
executein classAbstractConsoleCommand- Parameters:
args- arguments passed from the console (ignored for this command)
-