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.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.SrvrCommand,- Commands.StatResetCommand,- Commands.SyncedObserverConsCommand,- Commands.SystemPropertiesCommand,- Commands.VotingViewCommand,- Commands.WatchCommand,- Commands.WatchesByPathCommand,- Commands.WatchSummaryCommand,- Commands.ZabStateCommand
 
 public abstract class CommandBase extends Object implements Command 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedCommandBase(List<String> names)protectedCommandBase(List<String> names, boolean serverRequired)protectedCommandBase(List<String> names, boolean serverRequired, String doc)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDoc()A string documenting this command (e.g., what it does, any arguments it takes).Set<String>getNames()The set of all names that can be used to refer to this command (e.g., "configuration", "config", and "conf").StringgetPrimaryName()The name that is returned with the command response and that appears in the list of all commands.protected CommandResponseinitializeResponse()booleanisServerRequired()
 
- 
- 
- 
Method Detail- 
getPrimaryNamepublic String getPrimaryName() Description copied from interface:CommandThe 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:
- getPrimaryNamein interface- Command
 
 - 
getNamespublic Set<String> getNames() Description copied from interface:CommandThe set of all names that can be used to refer to this command (e.g., "configuration", "config", and "conf").
 - 
getDocpublic String getDoc() Description copied from interface:CommandA string documenting this command (e.g., what it does, any arguments it takes).
 - 
isServerRequiredpublic boolean isServerRequired() - Specified by:
- isServerRequiredin interface- Command
- Returns:
- true if the command requires an active ZooKeeperServer or a synced peer in order to resolve
 
 - 
initializeResponseprotected 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).
 
 
- 
 
-