Interface CLIListener

All Superinterfaces:
ExtensionPoint
All Known Implementing Classes:
DefaultCLIListener

public interface CLIListener extends ExtensionPoint
Allows implementations to listen to CLICommand.run() execution events.
Since:
TODO
  • Method Details

    • onExecution

      default void onExecution(@NonNull CLIContext context)
      Invoked before command execution.
      Parameters:
      context - Information about the command being executed.
    • onCompleted

      default void onCompleted(@NonNull CLIContext context, int exitCode)
      Invoked after command execution.
      Parameters:
      context - Information about the command being executed.
      exitCode - Exit code returned by the implementation of CLICommand.run().
    • onThrowable

      default void onThrowable(@NonNull CLIContext context, @NonNull Throwable t)
      Invoked when an exception or error occurs during command execution.
      Parameters:
      context - Information about the command being executed.
      t - Any error during the execution of the command.