Class CLIContext

java.lang.Object
jenkins.cli.listeners.CLIContext

public class CLIContext extends Object
Holds information of a command execution. Same instance is used to all CLIListener invocations. Use correlationId in order to group related events to the same command.
Since:
TODO
  • Constructor Details

    • CLIContext

      public CLIContext(@NonNull String command, @CheckForNull List<String> args, @Nullable org.springframework.security.core.Authentication auth)
      Parameters:
      command - The command being executed.
      args - Arguments passed to the command.
      auth - Authenticated user performing the execution.
  • Method Details

    • getCorrelationId

      @NonNull public String getCorrelationId()
      Returns:
      Correlate this command event to other, related command events.
    • getCommand

      @NonNull public String getCommand()
      Returns:
      Command being executed.
    • getArgs

      @NonNull public List<String> getArgs()
      Returns:
      Arguments passed to the command.
    • getAuth

      @CheckForNull public org.springframework.security.core.Authentication getAuth()
      Returns:
      Authenticated user performing the execution.