Package org.jboss.aesh.console.command

Examples of org.jboss.aesh.console.command.CommandResult


            this.console = aeshConsole;
        }

        @Override
        public int readConsoleOutput(ConsoleOperation output) {
            CommandResult result = CommandResult.SUCCESS;
            if (output != null && output.getBuffer().trim().length() > 0) {
                try (CommandContainer commandContainer = getCommand(
                        Parser.findFirstWord(output.getBuffer()),
                        output.getBuffer())) {
View Full Code Here


        AeshConsoleCallback(AeshConsole aeshConsole) {
            this.console = aeshConsole;
        }
        @Override
        public int readConsoleOutput(ConsoleOperation output) {
            CommandResult result = CommandResult.SUCCESS;
            if(output != null && output.getBuffer().trim().length() > 0) {
                try {
                    CommandContainer commandContainer =
                            getCommand( Parser.findFirstWord(output.getBuffer()), output.getBuffer());
View Full Code Here

        commandLine.getParser().getCommandPopulator().populateObject(commandLine.getParser().getCommand(), commandLine, invocationProviders, aeshContext, true);
        if(commandLine.getParser().getProcessedCommand().getValidator() != null &&
                !commandLine.hasOptionWithOverrideRequired())
            parser.getProcessedCommand().getValidator().validate(commandLine.getParser().getCommand());

        CommandResult result = commandLine.getParser().getCommand().execute(commandInvocation);

        return new CommandContainerResult(commandLine.getParser().getProcessedCommand().getResultHandler(), result);
    }
View Full Code Here

   @Override
   public Result execute(UIExecutionContext context) throws Exception
   {
      Map<Object, Object> attributeMap = context.getUIContext().getAttributeMap();
      CommandInvocation commandInvocation = (CommandInvocation) attributeMap.get(CommandInvocation.class);
      CommandResult result = command.execute(commandInvocation);
      if (result == CommandResult.FAILURE)
      {
         return Results.fail("Failure while executing aesh command");
      }
      else
View Full Code Here

   @Override
   public Result execute(UIExecutionContext context) throws Exception
   {
      Map<Object, Object> attributeMap = context.getUIContext().getAttributeMap();
      CommandInvocation commandInvocation = (CommandInvocation) attributeMap.get(CommandInvocation.class);
      CommandResult result = command.execute(commandInvocation);
      if (result == CommandResult.FAILURE)
      {
         return Results.fail("Failure while executing aesh command");
      }
      else
View Full Code Here

        }

        @Override
        @SuppressWarnings("unchecked")
        public int readConsoleOutput(ConsoleOperation output) {
            CommandResult result;
            if (output != null && output.getBuffer().trim().length() > 0) {
                try (CommandContainer commandContainer = getCommand(
                        Parser.findFirstWord(output.getBuffer()),
                        output.getBuffer())) {
View Full Code Here

TOP

Related Classes of org.jboss.aesh.console.command.CommandResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.