}
@Override
protected Void process(Object input) throws Exception {
final CommandTool jbossCliTool = getJBossCliTool();
if (controller != null) {
jbossCliTool.parameter("--controller=" + controller);
}
if (connect) {
jbossCliTool.parameter("--connect");
}
if (file != null) {
jbossCliTool.parameter("--file=" + file.getAbsolutePath());
}
if (this.command.size() == 1) {
jbossCliTool.parameter("--command=" + this.command.get(0));
}
if (this.command.size() > 1) {
jbossCliTool.parameter("--commands=" + getCommands());
}
if (user != null) {
jbossCliTool.parameter("--user=" + user);
}
if (password != null) {
jbossCliTool.parameter("--password=" + password);
}
jbossCliTool.execute().await();
return null;
}