public interface CommandHandler
Modifier and Type | Method and Description |
---|---|
Collection<CommandArgument> |
getArguments(CommandContext ctx) |
void |
handle(CommandContext ctx)
Handles the execution of 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.
|
boolean isAvailable(CommandContext ctx)
ctx
- current contextboolean isBatchMode(CommandContext ctx)
ctx
- the current contextvoid handle(CommandContext ctx) throws CommandFormatException
ctx
- current command contextCommandFormatException
boolean hasArgument(String name)
name
- argument name to checkboolean hasArgument(int index)
index
- argument index to checkCollection<CommandArgument> getArguments(CommandContext ctx)
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.