Class ExampleConsoleCommand

java.lang.Object
com.dianxin.tori.base.console.commands.AbstractConsoleCommand
com.dianxin.tori.base.console.commands.ExampleConsoleCommand

public class ExampleConsoleCommand extends AbstractConsoleCommand
A concrete implementation example of a console command. Triggers a graceful JVM shutdown sequence when the "stop" command is entered.
  • Constructor Details

    • ExampleConsoleCommand

      public ExampleConsoleCommand()
      Constructs the example shutdown command under the trigger keyword "stop".
  • Method Details

    • execute

      public void execute(String[] args)
      Executes the shutdown logic, providing a hook to safely clean up open resources.
      Specified by:
      execute in class AbstractConsoleCommand
      Parameters:
      args - arguments passed from the console (ignored for this command)