createSession(name.toString());
}
public void createSession(String name) {
try {
ServiceReference srl = Activator.bc.getServiceReference(ConsoleService.class.getName());
ConsoleService console = (ConsoleService) Activator.bc.getService(srl);
PipedWriter pipeToConsole = new PipedWriter();
Reader consoleIn = new PipedReader(pipeToConsole);
toConsole = new PrintWriter(pipeToConsole);
PipedReader pipeFromConsole = new PipedReader();
PrintWriter consoleOut = new PrintWriter(new PipedWriter(pipeFromConsole));
fromConsole = pipeFromConsole;
consoleSession = console.runSession(name, consoleIn, consoleOut);
} catch (Exception e) {}
}