# 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
Description
`static enum`
`ControlCommand.Action`
Actions available to the controller

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`ENDPOINT`
`static final String`
`ENDPOINT_PREFIX`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
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 Object

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

## Field Details

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

### ControlCommand

public ControlCommand(ControlCommand.Action action)

### ControlCommand

public ControlCommand(ControlCommand.Action action, String param)

## Method Details

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