本文整理了Java中org.glassfish.embeddable.GlassFish.getCommandRunner()
方法的一些代码示例,展示了GlassFish.getCommandRunner()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GlassFish.getCommandRunner()
方法的具体详情如下:
包路径:org.glassfish.embeddable.GlassFish
类名称: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));
内容来源于网络,如有侵权,请联系作者删除!