Examples of CommandRunner


Examples of org.glassfish.embeddable.CommandRunner

    public ConfiguratorImpl(Habitat habitat) {
        this.habitat = habitat;
    }

    public void configure(Properties props) throws GlassFishException {
        CommandRunner commandRunner = habitat.getComponent(CommandRunner.class);
        for (Object obj : props.keySet()) {
            String key = (String) obj;
            if (key.startsWith(CONFIG_PROP_PREFIX)) {
                CommandResult result = commandRunner.run("set",
                        key.substring(CONFIG_PROP_PREFIX.length()) + "=" + props.getProperty(key));
                if (result.getExitStatus() != CommandResult.ExitStatus.SUCCESS) {
                    throw new GlassFishException(result.getOutput());
                }
            }
View Full Code Here

Examples of org.glassfish.embeddable.CommandRunner

      }
   }
  
   private String executeCommand(String command, String... parameterList) throws Throwable
   {
      CommandRunner runner = glassfish.getCommandRunner();
      CommandResult result = runner.run(command, parameterList);

      String output = null;
      switch(result.getExitStatus())
      {
         case FAILURE:
View Full Code Here

Examples of org.glassfish.embeddable.CommandRunner

      }
      return output;
   }
  
   private void bindCommandRunner() throws NamingException, GlassFishException  {
        CommandRunner runner = glassfish.getCommandRunner();
        new InitialContext().bind("org.glassfish.embeddable.CommandRunner", runner);
   }
View Full Code Here

Examples of org.glassfish.embeddable.CommandRunner

      }
   }
  
   private void executeCommand(String command, String... parameterList) throws Throwable
   {
      CommandRunner runner = glassfish.getCommandRunner();
      CommandResult result = runner.run(command, parameterList);

      switch(result.getExitStatus())
      {
         case FAILURE:
         case WARNING:
View Full Code Here

Examples of org.glassfish.embeddable.CommandRunner

            break;
      }
   }
  
   private void bindCommandRunner() throws NamingException, GlassFishException  {
        CommandRunner runner = glassfish.getCommandRunner();
        new InitialContext().bind("org.glassfish.embeddable.CommandRunner", runner);
   }
View Full Code Here

Examples of org.glassfish.embeddable.CommandRunner

      }
   }
  
   private void executeCommand(String command, String... parameterList) throws Throwable
   {
      CommandRunner runner = glassfish.getCommandRunner();
      CommandResult result = runner.run(command, parameterList);

      switch(result.getExitStatus())
      {
         case FAILURE:
         case WARNING:
View Full Code Here

Examples of org.glassfish.embeddable.CommandRunner

            break;
      }
   }
  
   private void bindCommandRunner() throws NamingException, GlassFishException  {
        CommandRunner runner = glassfish.getCommandRunner();
        new InitialContext().bind("org.glassfish.embeddable.CommandRunner", runner);
   }
View Full Code Here

Examples of org.glassfish.embeddable.CommandRunner

    public ConfiguratorImpl(ServiceLocator habitat) {
        this.habitat = habitat;
    }

    public void configure(Properties props) throws GlassFishException {
        CommandRunner commandRunner = habitat.getService(CommandRunner.class);
        for (Object obj : props.keySet()) {
            String key = (String) obj;
            if (key.startsWith(CONFIG_PROP_PREFIX)) {
                CommandResult result = commandRunner.run("set",
                        key.substring(CONFIG_PROP_PREFIX.length()) + "=" + props.getProperty(key));
                if (result.getExitStatus() != CommandResult.ExitStatus.SUCCESS) {
                    throw new GlassFishException(result.getOutput());
                }
            }
View Full Code Here

Examples of org.jnode.shell.CommandRunner

        return "proclet";
    }
   
    public int invoke(CommandLine commandLine, Properties sysProps, Map<String, String> env)
        throws ShellException {
        CommandRunner cr = setup(commandLine, sysProps, env);
        return runIt(commandLine, cr);
    }
View Full Code Here

Examples of org.jnode.shell.CommandRunner

        return runIt(commandLine, cr);
    }

    public CommandThread invokeAsynchronous(CommandLine commandLine, Properties sysProps,
            Map<String, String> env) throws ShellException {
        CommandRunner cr = setup(commandLine, sysProps, env);
        return forkIt(commandLine, cr);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.