/** * Creates the instance of Terminal used directly in MicronautConsole. Note that there is also another terminal * instance created implicitly inside of ConsoleReader. That instance is controlled by the jline.terminal system * property. * * @return the new {@link Terminal} */ protected Terminal createTerminal() { terminal = TerminalFactory.create(); if (isWindows()) { terminal.setEchoEnabled(true); } return terminal; }
public static synchronized Terminal get(String ttyDevice) { // The code is assuming we've got only one terminal per process. // Continuing this assumption, if this terminal is already initialized, // we don't check if it's using the same tty line either. Both assumptions // are a bit crude. TODO: check single terminal assumption. if (term == null) { term = create(ttyDevice); } return term; }
public static synchronized Terminal create() { return create(null); }
public static synchronized Terminal get(String ttyDevice) { // The code is assuming we've got only one terminal per process. // Continuing this assumption, if this terminal is already initialized, // we don't check if it's using the same tty line either. Both assumptions // are a bit crude. TODO: check single terminal assumption. if (term == null) { term = create(ttyDevice); } return term; }
public static synchronized Terminal create() { return create(null); }
/** * Creates the instance of Terminal used directly in GrailsConsole. Note that there is also * another terminal instance created implicitly inside of ConsoleReader. That instance * is controlled by the jline.terminal system property. */ protected Terminal createTerminal() { terminal = TerminalFactory.create(); if(isWindows()) { terminal.setEchoEnabled(true); } return terminal; }
public EurekaCLI(Codec codec) throws IOException { this.context = new Context(codec); Terminal terminal = TerminalFactory.create(); terminal.setEchoEnabled(false); consoleReader = new ConsoleReader(System.in, System.out, terminal); loadConfiguration(); loadHistory(); Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { @Override public void run() { context.close(); } })); }
public EurekaCLI(EurekaTransportConfig transportConfig) throws IOException { this.context = new Context(transportConfig); Terminal terminal = TerminalFactory.create(); terminal.setEchoEnabled(false); consoleReader = new ConsoleReader(System.in, System.out, terminal); loadConfiguration(); loadHistory(); Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() { @Override public void run() { context.close(); } })); }
final Terminal term = TerminalFactory.create(); term.init(); ConsoleReader reader = new ConsoleReader(null, new FileInputStream(FileDescriptor.in), System.out, term);
public static void main(String[] args) throws Exception { Terminal term = TerminalFactory.create(); final PrintStream out = System.out; PrintStream err = System.err;