Class DefaultCLIListener

java.lang.Object
jenkins.cli.listeners.DefaultCLIListener
All Implemented Interfaces:
ExtensionPoint, CLIListener

@Extension @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class DefaultCLIListener extends Object implements CLIListener
Basic default implementation of CLIListener that just logs.
  • Constructor Details

    • DefaultCLIListener

      public DefaultCLIListener()
  • Method Details

    • onExecution

      public void onExecution(CLIContext context)
      Description copied from interface: CLIListener
      Invoked before command execution.
      Specified by:
      onExecution in interface CLIListener
      Parameters:
      context - Information about the command being executed.
    • onCompleted

      public void onCompleted(CLIContext context, int exitCode)
      Description copied from interface: CLIListener
      Invoked after command execution.
      Specified by:
      onCompleted in interface CLIListener
      Parameters:
      context - Information about the command being executed.
      exitCode - Exit code returned by the implementation of CLICommand.run().
    • onThrowable

      public void onThrowable(CLIContext context, Throwable t)
      Description copied from interface: CLIListener
      Invoked when an exception or error occurs during command execution.
      Specified by:
      onThrowable in interface CLIListener
      Parameters:
      context - Information about the command being executed.
      t - Any error during the execution of the command.