Class CommandBase
- java.lang.Object
-
- org.apache.zookeeper.server.admin.CommandBase
-
- All Implemented Interfaces:
Command
- Direct Known Subclasses:
Commands.CnxnStatResetCommand
,Commands.ConfCommand
,Commands.ConsCommand
,Commands.DirsCommand
,Commands.DumpCommand
,Commands.EnvCommand
,Commands.GetTraceMaskCommand
,Commands.IsroCommand
,Commands.MonitorCommand
,Commands.RuokCommand
,Commands.SetTraceMaskCommand
,Commands.SrvrCommand
,Commands.StatResetCommand
,Commands.WatchCommand
,Commands.WatchesByPathCommand
,Commands.WatchSummaryCommand
public abstract class CommandBase extends java.lang.Object implements Command
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CommandBase(java.util.List<java.lang.String> names)
protected
CommandBase(java.util.List<java.lang.String> names, java.lang.String doc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDoc()
A string documentating this command (e.g., what it does, any arguments it takes).java.util.Set<java.lang.String>
getNames()
The set of all names that can be used to refer to this command (e.g., "configuration", "config", and "conf").java.lang.String
getPrimaryName()
The name that is returned with the command response and that appears in the list of all commands.protected CommandResponse
initializeResponse()
-
-
-
Method Detail
-
getPrimaryName
public java.lang.String getPrimaryName()
Description copied from interface:Command
The name that is returned with the command response and that appears in the list of all commands. This should be a member of the set returned by getNames().- Specified by:
getPrimaryName
in interfaceCommand
-
getNames
public java.util.Set<java.lang.String> getNames()
Description copied from interface:Command
The set of all names that can be used to refer to this command (e.g., "configuration", "config", and "conf").
-
getDoc
public java.lang.String getDoc()
Description copied from interface:Command
A string documentating this command (e.g., what it does, any arguments it takes).
-
initializeResponse
protected CommandResponse initializeResponse()
- Returns:
- A response with the command set to the primary name and the error set to null (these are the two entries that all command responses are required to include).
-
-