Class PulsarClientTool

java.lang.Object
org.apache.pulsar.client.cli.PulsarClientTool
All Implemented Interfaces:
CommandHook
Direct Known Subclasses:
ClientShell

public class PulsarClientTool extends Object implements CommandHook
  • Field Details

    • rootParams

      protected PulsarClientTool.RootParams rootParams
    • commander

      protected final picocli.CommandLine commander
    • produceCommand

      protected CmdProduce produceCommand
    • consumeCommand

      protected CmdConsume consumeCommand
    • readCommand

      protected CmdRead readCommand
  • Constructor Details

    • PulsarClientTool

      public PulsarClientTool(Properties properties)
  • Method Details

    • preRun

      public int preRun()
      Description copied from interface: CommandHook
      The preRun hook is used to execute commands before.
      Specified by:
      preRun in interface CommandHook
      Returns:
      If the return value is 0, continue to the next stage.
    • initCommander

      protected void initCommander(Properties properties)
    • addCommand

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

      public int run(String[] args)
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • replaceProducerCommand

      public void replaceProducerCommand(CmdProduce object)
    • setCommandName

      protected void setCommandName(String name)
    • getServiceUrl

      protected String getServiceUrl()