public abstract class BaseOperationCommand extends CommandHandlerWithHelp implements OperationCommand, CliEventListener
| Modifier and Type | Field and Description |
|---|---|
protected ArgumentWithValue |
headers |
protected List<RequestParameterArgument> |
params |
protected OperationRequestAddress |
requiredAddress |
helpArg| Constructor and Description |
|---|
BaseOperationCommand(CommandContext ctx,
String command,
boolean connectionRequired) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(CommandArgument arg) |
protected void |
addHeaders(CommandContext ctx,
org.jboss.dmr.ModelNode request) |
protected void |
addRequiredPath(OperationRequestAddress requiredPath)
Adds a node path which is required to exist before the command can be used.
|
protected void |
addRequiredPath(String requiredPath)
Adds a node path which is required to exist before the command can be used.
|
org.jboss.dmr.ModelNode |
buildRequest(CommandContext ctx) |
protected abstract org.jboss.dmr.ModelNode |
buildRequestWithoutHeaders(CommandContext ctx) |
void |
cliEvent(CliEvent event,
CommandContext ctx) |
protected void |
doHandle(CommandContext ctx) |
protected OperationRequestAddress |
getRequiredAddress() |
protected String |
getRequiredType() |
protected void |
handleResponse(CommandContext ctx,
org.jboss.dmr.ModelNode response,
boolean composite) |
boolean |
isAvailable(CommandContext ctx)
Checks whether the command is available in the current context
(e.g.
|
protected boolean |
isDependsOnProfile() |
protected void |
setParams(CommandContext ctx,
org.jboss.dmr.ModelNode request) |
handle, isBatchMode, printHelp, printListgetArguments, hasArgument, hasArgumentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetArguments, handle, hasArgument, hasArgument, isBatchModeprotected List<RequestParameterArgument> params
protected OperationRequestAddress requiredAddress
protected ArgumentWithValue headers
public BaseOperationCommand(CommandContext ctx, String command, boolean connectionRequired)
protected void addRequiredPath(String requiredPath)
requiredPath - node path which is required to exist before the command can be used.protected void addRequiredPath(OperationRequestAddress requiredPath)
requiredPath - node path which is required to exist before the command can be used.protected boolean isDependsOnProfile()
protected OperationRequestAddress getRequiredAddress()
protected String getRequiredType()
public boolean isAvailable(CommandContext ctx)
CommandHandlerisAvailable in interface CommandHandlerisAvailable in class CommandHandlerWithHelpctx - current contextpublic void cliEvent(CliEvent event, CommandContext ctx)
cliEvent in interface CliEventListenerprotected void doHandle(CommandContext ctx) throws CommandLineException
doHandle in class CommandHandlerWithHelpCommandLineExceptionpublic org.jboss.dmr.ModelNode buildRequest(CommandContext ctx) throws CommandFormatException
buildRequest in interface OperationCommandCommandFormatExceptionprotected abstract org.jboss.dmr.ModelNode buildRequestWithoutHeaders(CommandContext ctx) throws CommandFormatException
CommandFormatExceptionprotected void addHeaders(CommandContext ctx, org.jboss.dmr.ModelNode request) throws CommandFormatException
CommandFormatExceptionprotected void handleResponse(CommandContext ctx, org.jboss.dmr.ModelNode response, boolean composite) throws CommandFormatException
CommandFormatExceptionpublic void addArgument(CommandArgument arg)
addArgument in class CommandHandlerWithArgumentsprotected void setParams(CommandContext ctx, org.jboss.dmr.ModelNode request) throws CommandFormatException
CommandFormatExceptionCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.