本文整理了Java中org.jline.terminal.Terminal.close()
方法的一些代码示例,展示了Terminal.close()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Terminal.close()
方法的具体详情如下:
包路径:org.jline.terminal.Terminal
类名称:Terminal
方法名:close
暂无
代码示例来源:origin: confluentinc/ksql
@Override
public void close() {
try {
terminal.close();
} catch (final IOException e) {
// Swallow
}
}
代码示例来源:origin: apache/karaf
@Override
public void close() throws IOException {
terminal.close();
}
代码示例来源:origin: apache/felix
public void exit() throws Exception {
terminal.close();
}
};
代码示例来源:origin: org.apache.karaf.shell/org.apache.karaf.shell.core
@Override
public void close() throws IOException {
terminal.close();
}
代码示例来源:origin: com.github.fonimus/ssh-shell-starter
@Override
public void close() throws IOException {
delegate().close();
}
}
代码示例来源:origin: com.github.fonimus/spring-boot-ssh-shell-starter
@Override
public void close() throws IOException {
delegate().close();
}
}
代码示例来源:origin: me.tongfei/progressbar
/**
* <p>Stops this progress bar, effectively stops tracking the underlying process.</p>
* <p>Implements the {@link AutoCloseable} interface which enables the try-with-resource
* pattern with progress bars.</p>
* @since 0.7.0
*/
@Override
public void close() {
target.kill();
try {
thread.join();
target.consoleStream.print("\n");
target.consoleStream.flush();
target.terminal.close();
}
catch (InterruptedException | IOException ignored) { }
}
代码示例来源:origin: ctongfei/progressbar
/**
* <p>Stops this progress bar, effectively stops tracking the underlying process.</p>
* <p>Implements the {@link AutoCloseable} interface which enables the try-with-resource
* pattern with progress bars.</p>
* @since 0.7.0
*/
@Override
public void close() {
target.kill();
try {
thread.join();
target.consoleStream.print("\n");
target.consoleStream.flush();
target.terminal.close();
}
catch (InterruptedException | IOException ignored) { }
}
代码示例来源:origin: apache/felix
shell.stop();
try {
terminal.close();
} catch (IOException e) {
代码示例来源:origin: jpos/jPOS
getReader().getTerminal().close();
} catch (IOException e) {
ctx.printThrowable(e);
代码示例来源:origin: apache/felix
private void runShell(CommandSession session, Terminal terminal) {
InputStream in = terminal.input();
OutputStream out = terminal.output();
CommandSession newSession = processor.createSession(in, out, out);
newSession.put(Shell.VAR_TERMINAL, terminal);
newSession.put(".tmux", session.get(".tmux"));
Context context = new Context() {
public String getProperty(String name) {
return System.getProperty(name);
}
public void exit() throws Exception {
terminal.close();
}
};
try {
new Shell(context, processor).gosh(newSession, new String[]{"--login"});
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
terminal.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
代码示例来源:origin: apache/samza
terminal.close();
} catch (IOException e) {
内容来源于网络,如有侵权,请联系作者删除!