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 Summary
Fields Modifier and Type Field Description static int
confCmd
static int
consCmd
static int
crstCmd
static int
dirsCmd
static int
dumpCmd
static int
enviCmd
static int
getTraceMaskCmd
protected static int
hashCmd
static int
isroCmd
static int
mntrCmd
static int
ruokCmd
static int
setTraceMaskCmd
static int
srstCmd
static int
srvrCmd
static int
statCmd
static int
telnetCloseCmd
static int
wchcCmd
static int
wchpCmd
static int
wchsCmd
-
Constructor Summary
Constructors Constructor Description FourLetterCommands()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getCommandString(int command)
Return the string representation of the specified command code.static boolean
isEnabled(String command)
Check if the specified command is enabled.static boolean
isKnown(int command)
Check if the specified command code is from a known command.static void
resetWhiteList()
-
-
-
Field Detail
-
confCmd
public static final int confCmd
-
consCmd
public static final int consCmd
-
crstCmd
public static final int crstCmd
-
dirsCmd
public static final int dirsCmd
-
dumpCmd
public static final int dumpCmd
-
enviCmd
public static final int enviCmd
-
getTraceMaskCmd
public static final int getTraceMaskCmd
-
ruokCmd
public static final int ruokCmd
-
setTraceMaskCmd
public static final int setTraceMaskCmd
-
srvrCmd
public static final int srvrCmd
-
srstCmd
public static final int srstCmd
-
statCmd
public static final int statCmd
-
wchcCmd
public static final int wchcCmd
-
wchpCmd
public static final int wchpCmd
-
wchsCmd
public static final int wchsCmd
-
mntrCmd
public static final int mntrCmd
-
isroCmd
public static final int isroCmd
-
hashCmd
protected static final int hashCmd
-
telnetCloseCmd
public static final int telnetCloseCmd
- See Also:
- Constant Field Values
-
-
Method Detail
-
resetWhiteList
public static void resetWhiteList()
-
getCommandString
public static String getCommandString(int command)
Return the string representation of the specified command code.
-
isKnown
public 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.
-
isEnabled
public 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
-
-