this.callback = callback;
}
public void start(final Environment env) throws IOException {
try {
Console console = new Console(commandProcessor,
in,
new PrintStream(new LfToCrLfFilterOutputStream(out), true),
new PrintStream(new LfToCrLfFilterOutputStream(err), true),
new SshTerminal(env),
new AggregateCompleter(completers),
new Runnable() {
public void run() {
destroy();
}
});
CommandSession session = console.getSession();
session.put("APPLICATION", System.getProperty("karaf.name", "root"));
for (Map.Entry<String,String> e : env.getEnv().entrySet()) {
session.put(e.getKey(), e.getValue());
}
new Thread(console).start();