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

org.apache.zookeeper.server.controller

## Class ControlCommand

- java.lang.Object
- - org.apache.zookeeper.server.controller.ControlCommand

-     public class ControlCommand
      extends Object

  Set of commands that this controller can execute. Commands are comprised of an action and an optional parameter specific to that action.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ControlCommand.Action` Actions available to the controller

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ENDPOINT`
    `static String` | `ENDPOINT_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ControlCommand(ControlCommand.Action action)`
    `ControlCommand(ControlCommand.Action action, String param)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `createCommandUri(ControlCommand.Action action, String parameter)` Create a REST command uri.
    `ControlCommand.Action` | `getAction()`
    `protected String` | `getParameter()`
    `static ControlCommand` | `parseUri(String commandUri)` Parse a Uri into the required Command action and parameter.

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### ENDPOINT

          public static final String ENDPOINT

      See Also:
        Constant Field Values

    - #### ENDPOINT_PREFIX

          public static final String ENDPOINT_PREFIX

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ControlCommand

          public ControlCommand(ControlCommand.Action action)

    - #### ControlCommand

          public ControlCommand(ControlCommand.Action action,
                                String param)

  - ### Method Detail

    - #### getAction

          public ControlCommand.Action getAction()

    - #### getParameter

          protected String getParameter()

    - #### createCommandUri

          public static String createCommandUri(ControlCommand.Action action,
                                                String parameter)

      Create a REST command uri.
      Parameters:
        `action` - The 'verb' of the command.
        `parameter` - The optional parameter.
      Returns:
        A string to send to the server as the end of the Uri.

    - #### parseUri

          public static ControlCommand parseUri(String commandUri)

      Parse a Uri into the required Command action and parameter.
      Parameters:
        `commandUri` - the properly formatted Uri.

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