public class OperationRequestHandler extends Object implements CommandHandler, OperationCommand
| Constructor and Description |
|---|
OperationRequestHandler() |
| Modifier and Type | Method and Description |
|---|---|
org.jboss.dmr.ModelNode |
buildRequest(CommandContext ctx) |
List<CommandArgument> |
getArguments(CommandContext ctx)
Returns a collection of the command arguments the handler supports in the current context.
|
void |
handle(CommandContext ctx)
Executes the command.
|
boolean |
hasArgument(int index)
Checks whether the command handler accepts an argument with the specified index.
|
boolean |
hasArgument(String name)
Checks whether the command handler recognizes the argument by the name.
|
boolean |
isAvailable(CommandContext ctx)
Checks whether the command is available in the current context
(e.g.
|
boolean |
isBatchMode(CommandContext ctx)
Whether the command supports batch mode or not.
|
public boolean isBatchMode(CommandContext ctx)
CommandHandlerisBatchMode in interface CommandHandlerctx - the current contextpublic void handle(CommandContext ctx) throws CommandLineException
CommandHandlerhandle in interface CommandHandlerctx - current command contextCommandLineException - if for any reason the command can't be properly handled
the implementation must throw an instance of CommandLineException.public boolean isAvailable(CommandContext ctx)
CommandHandlerisAvailable in interface CommandHandlerctx - current contextpublic org.jboss.dmr.ModelNode buildRequest(CommandContext ctx) throws CommandFormatException
buildRequest in interface OperationCommandCommandFormatExceptionpublic boolean hasArgument(String name)
CommandHandlerhasArgument in interface CommandHandlername - argument name to checkpublic boolean hasArgument(int index)
CommandHandlerhasArgument in interface CommandHandlerindex - argument index to checkpublic List<CommandArgument> getArguments(CommandContext ctx)
CommandHandlergetArguments in interface CommandHandlerctx - current command line contextCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.