本文整理了Java中org.jline.terminal.Terminal.enterRawMode()
方法的一些代码示例,展示了Terminal.enterRawMode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Terminal.enterRawMode()
方法的具体详情如下:
包路径:org.jline.terminal.Terminal
类名称:Terminal
方法名:enterRawMode
暂无
代码示例来源:origin: apache/karaf
@Override
public Attributes enterRawMode() {
return terminal.enterRawMode();
}
代码示例来源:origin: org.apache.karaf.shell/org.apache.karaf.shell.core
@Override
public Attributes enterRawMode() {
return terminal.enterRawMode();
}
代码示例来源:origin: com.github.fonimus/spring-boot-ssh-shell-starter
@Override
public Attributes enterRawMode() {
return delegate().enterRawMode();
}
代码示例来源:origin: com.github.fonimus/ssh-shell-starter
@Override
public Attributes enterRawMode() {
return delegate().enterRawMode();
}
代码示例来源:origin: apache/karaf
@Override
public Object execute() throws Exception {
if (arguments == null || arguments.length() == 0) {
System.err.println("Argument expected");
} else {
WatchTask watchTask = new WatchTask();
executorService.scheduleAtFixedRate(watchTask, 0, interval, TimeUnit.SECONDS);
try {
Terminal terminal = (Terminal) session.get(".jline.terminal");
Terminal.SignalHandler prev = terminal.handle(Terminal.Signal.INT, this::abort);
Attributes attr = terminal.enterRawMode();
try {
reading = Thread.currentThread();
while (terminal.reader().read(1) == NonBlockingReader.READ_EXPIRED);
} finally {
reading = null;
terminal.setAttributes(attr);
terminal.handle(Terminal.Signal.INT, prev);
}
} catch (InterruptedIOException e) {
// Ignore
} finally {
abort = true;
executorService.shutdownNow();
}
}
return null;
}
代码示例来源:origin: org.apache.karaf.shell/org.apache.karaf.shell.commands
@Override
public Object execute() throws Exception {
if (arguments == null || arguments.length() == 0) {
System.err.println("Argument expected");
} else {
WatchTask watchTask = new WatchTask();
executorService.scheduleAtFixedRate(watchTask, 0, interval, TimeUnit.SECONDS);
try {
Terminal terminal = (Terminal) session.get(".jline.terminal");
Terminal.SignalHandler prev = terminal.handle(Terminal.Signal.INT, this::abort);
Attributes attr = terminal.enterRawMode();
try {
reading = Thread.currentThread();
while (terminal.reader().read(1) == NonBlockingReader.READ_EXPIRED);
} finally {
reading = null;
terminal.setAttributes(attr);
terminal.handle(Terminal.Signal.INT, prev);
}
} catch (InterruptedIOException e) {
// Ignore
} finally {
abort = true;
executorService.shutdownNow();
}
}
return null;
}
代码示例来源:origin: apache/felix
};
executorService.scheduleAtFixedRate(task, 0, interval, TimeUnit.SECONDS);
Attributes attr = terminal.enterRawMode();
terminal.reader().read();
terminal.setAttributes(attr);
代码示例来源:origin: org.jline/jline-builtins
Attributes attr = terminal.enterRawMode();
try {
代码示例来源:origin: org.jline/jline
Attributes attr = terminal.enterRawMode();
try {
代码示例来源:origin: org.jline/jline
Attributes attr = terminal.enterRawMode();
try {
window = size.getRows() - 1;
代码示例来源:origin: org.jline/jline-remote-ssh
} else {
final ChannelShell channel = sshSession.createShellChannel();
Attributes attributes = terminal.enterRawMode();
try {
Map<PtyMode, Integer> modes = new HashMap<>();
代码示例来源:origin: apache/karaf
Attributes attributes = terminal.enterRawMode();
try {
Map<PtyMode, Integer> modes = new HashMap<>();
代码示例来源:origin: org.jline/jline
} else {
final ChannelShell channel = sshSession.createShellChannel();
Attributes attributes = terminal.enterRawMode();
try {
Map<PtyMode, Integer> modes = new HashMap<>();
代码示例来源:origin: apache/karaf
final ChannelShell channel = sshSession.createShellChannel();
final org.jline.terminal.Terminal terminal = (org.jline.terminal.Terminal) session.get(".jline.terminal");
Attributes attributes = terminal.enterRawMode();
try {
Map<PtyMode, Integer> modes = new HashMap<>();
代码示例来源:origin: org.apache.karaf/org.apache.karaf.client
Attributes attributes = terminal.enterRawMode();
try {
Map<PtyMode, Integer> modes = new HashMap<>();
代码示例来源:origin: org.apache.karaf.shell/org.apache.karaf.shell.ssh
final ChannelShell channel = sshSession.createShellChannel();
final org.jline.terminal.Terminal terminal = (org.jline.terminal.Terminal) session.get(".jline.terminal");
Attributes attributes = terminal.enterRawMode();
try {
Map<PtyMode, Integer> modes = new HashMap<>();
代码示例来源:origin: org.jline/jline-builtins
SignalHandler prevIntHandler = terminal.handle(Signal.INT, this::interrupt);
SignalHandler prevSuspHandler = terminal.handle(Signal.TSTP, this::suspend);
Attributes attributes = terminal.enterRawMode();
terminal.puts(Capability.enter_ca_mode);
terminal.puts(Capability.keypad_xmit);
代码示例来源:origin: org.jline/jline
SignalHandler prevIntHandler = terminal.handle(Signal.INT, this::interrupt);
SignalHandler prevSuspHandler = terminal.handle(Signal.TSTP, this::suspend);
Attributes attributes = terminal.enterRawMode();
terminal.puts(Capability.enter_ca_mode);
terminal.puts(Capability.keypad_xmit);
代码示例来源:origin: org.jline/jline
protected void handleSignal(Signal signal) {
if (signal == Signal.WINCH) {
size.copy(terminal.getSize());
display.resize(size.getRows(), size.getColumns());
redisplay();
}
else if (signal == Signal.CONT) {
terminal.enterRawMode();
size.copy(terminal.getSize());
display.resize(size.getRows(), size.getColumns());
terminal.puts(Capability.keypad_xmit);
redrawLine();
redisplay();
}
}
代码示例来源:origin: org.jline/jline
previousWinchHandler = terminal.handle(Signal.WINCH, this::handleSignal);
previousContHandler = terminal.handle(Signal.CONT, this::handleSignal);
originalAttributes = terminal.enterRawMode();
内容来源于网络,如有侵权,请联系作者删除!