Package org.jboss.as.cli
Interface CommandLineRedirection
-
public interface CommandLineRedirectionRedirection for handling of entered command lines. Normally, entered command lines are parsed and handled immediately by the appropriate handlers. An implementation of this interface (once registered to the CommandContext), will be intervening after the parsing step and will be taking the handling of the command lines from that point. Until it decides to unregister from the CommandContext.- Author:
- Alexey Loubyansky
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCommandLineRedirection.RegistrationRepresents registration of the command line redirection
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandle(CommandContext ctx)As the user enters a new command line, the command line is parsed and, if there were no parsing errors, this method is invoked.voidset(CommandLineRedirection.Registration registration)This method is called when the instance is registered to the command context.
-
-
-
Method Detail
-
set
void set(CommandLineRedirection.Registration registration)
This method is called when the instance is registered to the command context.- Parameters:
registration- the registration object
-
handle
void handle(CommandContext ctx) throws CommandLineException
As the user enters a new command line, the command line is parsed and, if there were no parsing errors, this method is invoked. In case parsing failed, the user will be notified immediately and this method will not be called. The implementation of this method can also throw an instance of CommandLineException in case it encountered a problem handling the command line.- Parameters:
ctx- current instance of CommandContext- Throws:
CommandLineException- in case something went wrong
-
-