FourLetterCommands (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.server.command

## 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 and 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 and Description
    `FourLetterCommands()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and 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 java.lang.Object

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

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

  - ### Constructor Detail

    - #### FourLetterCommands

          public FourLetterCommands()

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

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.