Class FourLetterCommands
- java.lang.Object
- 
- org.apache.zookeeper.server.command.FourLetterCommands
 
- 
 public class FourLetterCommands extends Object This class contains constants for all the four letter commands
- 
- 
Field SummaryFields Modifier and Type Field Description static intconfCmdstatic intconsCmdstatic intcrstCmdstatic intdirsCmdstatic intdumpCmdstatic intenviCmdstatic intgetTraceMaskCmdprotected static inthashCmdstatic intisroCmdstatic intmntrCmdstatic intruokCmdstatic intsetTraceMaskCmdstatic intsrstCmdstatic intsrvrCmdstatic intstatCmdstatic inttelnetCloseCmdstatic intwchcCmdstatic intwchpCmdstatic intwchsCmd
 - 
Constructor SummaryConstructors Constructor Description FourLetterCommands()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetCommandString(int command)Return the string representation of the specified command code.static booleanisEnabled(String command)Check if the specified command is enabled.static booleanisKnown(int command)Check if the specified command code is from a known command.static voidresetWhiteList()
 
- 
- 
- 
Field Detail- 
confCmdpublic static final int confCmd 
 - 
consCmdpublic static final int consCmd 
 - 
crstCmdpublic static final int crstCmd 
 - 
dirsCmdpublic static final int dirsCmd 
 - 
dumpCmdpublic static final int dumpCmd 
 - 
enviCmdpublic static final int enviCmd 
 - 
getTraceMaskCmdpublic static final int getTraceMaskCmd 
 - 
ruokCmdpublic static final int ruokCmd 
 - 
setTraceMaskCmdpublic static final int setTraceMaskCmd 
 - 
srvrCmdpublic static final int srvrCmd 
 - 
srstCmdpublic static final int srstCmd 
 - 
statCmdpublic static final int statCmd 
 - 
wchcCmdpublic static final int wchcCmd 
 - 
wchpCmdpublic static final int wchpCmd 
 - 
wchsCmdpublic static final int wchsCmd 
 - 
mntrCmdpublic static final int mntrCmd 
 - 
isroCmdpublic static final int isroCmd 
 - 
hashCmdprotected static final int hashCmd 
 - 
telnetCloseCmdpublic static final int telnetCloseCmd - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
resetWhiteListpublic static void resetWhiteList() 
 - 
getCommandStringpublic static String getCommandString(int command) Return the string representation of the specified command code.
 - 
isKnownpublic static boolean isKnown(int command) Check if the specified command code is from a known command.- Parameters:
- command- The integer code of command.
- Returns:
- true if the specified command is known, false otherwise.
 
 - 
isEnabledpublic static boolean isEnabled(String command) Check if the specified command is enabled. In ZOOKEEPER-2693 we introduce a configuration option to only allow a specific set of white listed commands to execute. A command will only be executed if it is also configured in the white list.- Parameters:
- command- The command string.
- Returns:
- true if the specified command is enabled
 
 
- 
 
-