Package jenkins.cli.listeners
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonCompleted(CLIContext context, int exitCode) Invoked after command execution.voidonExecution(CLIContext context) Invoked before command execution.voidonThrowable(CLIContext context, Throwable t) Invoked when an exception or error occurs during command execution.
-
Constructor Details
-
DefaultCLIListener
public DefaultCLIListener()
-
-
Method Details
-
onExecution
Description copied from interface:CLIListenerInvoked before command execution.- Specified by:
onExecutionin interfaceCLIListener- Parameters:
context- Information about the command being executed.
-
onCompleted
Description copied from interface:CLIListenerInvoked after command execution.This method or
CLIListener.onThrowable(CLIContext, Throwable)will be called, but not both.- Specified by:
onCompletedin interfaceCLIListener- Parameters:
context- Information about the command being executed.exitCode- Exit code returned by the implementation ofCLICommand.run().
-
onThrowable
Description copied from interface:CLIListenerInvoked when an exception or error occurs during command execution.This method or
CLIListener.onCompleted(CLIContext, int)will be called, but not both.- Specified by:
onThrowablein interfaceCLIListener- Parameters:
context- Information about the command being executed.t- Any error during the execution of the command.
-