org.glassfish.embeddable.GlassFish.getCommandRunner()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中org.glassfish.embeddable.GlassFish.getCommandRunner()方法的一些代码示例,展示了GlassFish.getCommandRunner()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GlassFish.getCommandRunner()方法的具体详情如下:
包路径:org.glassfish.embeddable.GlassFish
类名称:GlassFish
方法名:getCommandRunner

GlassFish.getCommandRunner介绍

[英]Gets a CommandRunner instance, using which the user can run asadmin commands. Calling this method is equivalent to calling getService(CommandRunner.class, null) Each invocation of this method returns a new CommandRunner object.
[中]获取CommandRunner实例,用户可以使用该实例运行asadmin命令。调用此方法相当于调用getService(CommandRunner.class, null)此方法的每次调用都会返回一个新的CommandRunner对象。

代码示例

代码示例来源:origin: org.glassfish.main.core/glassfish

@Override
  public CommandRunner getCommandRunner() throws GlassFishException {
    return decoratedGf.getCommandRunner();
  }
}

代码示例来源:origin: eclipse-ee4j/glassfish

@Override
  public CommandRunner getCommandRunner() throws GlassFishException {
    return decoratedGf.getCommandRunner();
  }
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-glassfish-embedded-3.1

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

代码示例来源:origin: com.java-adventures.junit/glassfish-junit-rule

public CommandRunner getCommandRunner() {
  try {
    return gf.get().getCommandRunner();
  } catch (Exception e) {
    log.error("GlassFish not ready, yet.", e);
    fail();
  }
  return null;
}

代码示例来源:origin: org.jboss.arquillian.container/arquillian-glassfish-embedded-3.1

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:
    case WARNING:
      throw result.getFailureCause();
    case SUCCESS:
      output = result.getOutput();
      log.info("command " + command + " parameters" + parameterList + " result: " + output);
      break;
  }
  return output;
}

代码示例来源:origin: org.glassfish.main.core/glassfish

CommandRunner cr = gf.getCommandRunner();

代码示例来源:origin: eclipse-ee4j/glassfish

CommandRunner cr = gf.getCommandRunner();

代码示例来源:origin: org.glassfish.main.core/glassfish

continue;
CommandRunner cmdRunner = gf.getCommandRunner();
String[] tokens = command.split("\\s");
CommandResult result = cmdRunner.run(tokens[0], Arrays.copyOfRange(tokens, 1, tokens.length));

代码示例来源:origin: eclipse-ee4j/glassfish

continue;
CommandRunner cmdRunner = gf.getCommandRunner();
String[] tokens = command.split("\\s");
CommandResult result = cmdRunner.run(tokens[0], Arrays.copyOfRange(tokens, 1, tokens.length));

相关文章