Class ConfigShell

java.lang.Object
org.apache.pulsar.shell.ConfigShell
All Implemented Interfaces:
ShellCommandsProvider

public class ConfigShell extends Object implements ShellCommandsProvider
Shell commands to manage shell configurations.
  • Constructor Details

    • ConfigShell

      public ConfigShell(PulsarShell pulsarShell)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: ShellCommandsProvider
      Name of the commands. This will be used as program name.
      Specified by:
      getName in interface ShellCommandsProvider
      Returns:
    • getServiceUrl

      public String getServiceUrl()
      Description copied from interface: ShellCommandsProvider
      Current service url for connecting to brokers. If the provider doesn't need brokers connection or the service url is not set it must return null.
      Specified by:
      getServiceUrl in interface ShellCommandsProvider
      Returns:
      service url
    • getAdminUrl

      public String getAdminUrl()
      Description copied from interface: ShellCommandsProvider
      Current admin url for connecting to pulsar admin. If the provider doesn't need brokers connection or the admin url is not set it must return null.
      Specified by:
      getAdminUrl in interface ShellCommandsProvider
      Returns:
      admin url
    • setupState

      public void setupState(Properties properties)
      Description copied from interface: ShellCommandsProvider
      Init state before a command is executed. If the implementing class rely on JCommander, it's suggested to not recycle JCommander objects because they are meant to single-shot usage.
      Specified by:
      setupState in interface ShellCommandsProvider
    • cleanupState

      public void cleanupState(Properties properties)
      Description copied from interface: ShellCommandsProvider
      Cleanup state after a command is executed. If the implementing class rely on JCommander, it's suggested to not recycle JCommander objects because they are meant to single-shot usage.
      Specified by:
      cleanupState in interface ShellCommandsProvider
    • getJCommander

      public com.beust.jcommander.JCommander getJCommander()
      Description copied from interface: ShellCommandsProvider
      Return JCommander instance, if exists.
      Specified by:
      getJCommander in interface ShellCommandsProvider
      Returns:
    • runCommand

      public boolean runCommand(String[] args) throws Exception
      Description copied from interface: ShellCommandsProvider
      Run command for the passed args.
      Specified by:
      runCommand in interface ShellCommandsProvider
      Parameters:
      args - arguments for the command. Note that the first word of the user command is omitted.
      Throws:
      Exception - if any error occurs. The shell session will not be closed.