# 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 final int`
`confCmd`
`static final int`
`consCmd`
`static final int`
`crstCmd`
`static final int`
`dirsCmd`
`static final int`
`dumpCmd`
`static final int`
`enviCmd`
`static final int`
`getTraceMaskCmd`
`protected static final int`
`hashCmd`
`static final int`
`isroCmd`
`static final int`
`mntrCmd`
`static final int`
`ruokCmd`
`static final int`
`setTraceMaskCmd`
`static final int`
`srstCmd`
`static final int`
`srvrCmd`
`static final int`
`statCmd`
`static final int`
`telnetCloseCmd`
`static final int`
`wchcCmd`
`static final int`
`wchpCmd`
`static final int`
`wchsCmd`

## Constructor Summary

Constructors
Constructor
Description
`FourLetterCommands()`

## Method Summary

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()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### 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

## Constructor Details

### FourLetterCommands

public FourLetterCommands()

## Method Details

### 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