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 SummaryNested Classes Modifier and Type Class Description static classControlCommand.ActionActions available to the controller
 - 
Field SummaryFields Modifier and Type Field Description static StringENDPOINTstatic StringENDPOINT_PREFIX
 - 
Constructor SummaryConstructors Constructor Description ControlCommand(ControlCommand.Action action)ControlCommand(ControlCommand.Action action, String param)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringcreateCommandUri(ControlCommand.Action action, String parameter)Create a REST command uri.ControlCommand.ActiongetAction()protected StringgetParameter()static ControlCommandparseUri(String commandUri)Parse a Uri into the required Command action and parameter.
 
- 
- 
- 
Field Detail- 
ENDPOINTpublic static final String ENDPOINT - See Also:
- Constant Field Values
 
 - 
ENDPOINT_PREFIXpublic static final String ENDPOINT_PREFIX - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ControlCommandpublic ControlCommand(ControlCommand.Action action) 
 - 
ControlCommandpublic ControlCommand(ControlCommand.Action action, String param) 
 
- 
 - 
Method Detail- 
getActionpublic ControlCommand.Action getAction() 
 - 
getParameterprotected String getParameter() 
 - 
createCommandUripublic 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.
 
 - 
parseUripublic static ControlCommand parseUri(String commandUri) Parse a Uri into the required Command action and parameter.- Parameters:
- commandUri- the properly formatted Uri.
 
 
- 
 
-