Class GetCommand

java.lang.Object
org.apache.zookeeper.server.admin.CommandBase
org.apache.zookeeper.server.admin.GetCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
Commands.CnxnStatResetCommand, Commands.ConfCommand, Commands.ConsCommand, Commands.DigestCommand, Commands.DirsCommand, Commands.DumpCommand, Commands.EnvCommand, Commands.GetTraceMaskCommand, Commands.InitialConfigurationCommand, Commands.IsroCommand, Commands.LastSnapshotCommand, Commands.LeaderCommand, Commands.MonitorCommand, Commands.ObserverCnxnStatResetCommand, Commands.RuokCommand, Commands.SetTraceMaskCommand, Commands.SnapshotCommand, Commands.SrvrCommand, Commands.StatResetCommand, Commands.SyncedObserverConsCommand, Commands.SystemPropertiesCommand, Commands.VotingViewCommand, Commands.WatchCommand, Commands.WatchesByPathCommand, Commands.WatchSummaryCommand, Commands.ZabStateCommand

public abstract class GetCommand extends CommandBase
Command that represents HTTP GET request
  • Constructor Details

    • GetCommand

      protected GetCommand(List<String> names)
    • GetCommand

      protected GetCommand(List<String> names, boolean serverRequired)
    • GetCommand

      protected GetCommand(List<String> names, boolean serverRequired, AuthRequest authRequest)
  • Method Details

    • runPost

      public CommandResponse runPost(ZooKeeperServer zkServer, InputStream inputStream)
      Description copied from interface: Command
      Run this command for HTTP POST. Commands take a ZooKeeperServer and InputStream and return a CommandResponse object containing any information constituting the response to the command. Commands are responsible for parsing keyword arguments and performing any error handling if necessary. Errors should be reported by setting the "error" entry of the returned map with an appropriate message rather than throwing an exception.
      Parameters:
      zkServer - ZooKeeper server
      inputStream - InputStream from request
      Returns:
      CommandResponse representing response to command containing at minimum: - "command" key containing the command's primary name - "error" key containing a String error message or null if no error