Class CmdBase

java.lang.Object
org.apache.pulsar.testclient.CmdBase
All Implemented Interfaces:
Callable<Integer>
Direct Known Subclasses:
BrokerMonitor, CmdGenerateDocumentation, LoadSimulationClient, LoadSimulationController, ManagedLedgerWriter, PerformanceBaseArguments, PerformanceClient

public abstract class CmdBase extends Object implements Callable<Integer>
  • Constructor Details

    • CmdBase

      public CmdBase(String cmdName)
  • Method Details

    • run

      public boolean run(String[] args)
    • parse

      public void parse(String[] args)
    • validate

      public void validate() throws Exception
      Validate the CLI arguments. Default implementation provides validation for the common arguments. Each subclass should call super.validate() and provide validation code specific to the sub-command.
      Throws:
      Exception
    • call

      public Integer call() throws Exception
      Specified by:
      call in interface Callable<Integer>
      Throws:
      Exception
    • run

      public abstract void run() throws Exception
      Throws:
      Exception
    • getCommander

      protected picocli.CommandLine getCommander()
    • addCommand

      protected void addCommand(String name, Object cmd)
    • addCommand

      protected void addCommand(String name, Object cmd, String... aliases)