use of com.sshtools.client.PseudoTerminalModes in project agileway by fangjinuo.
the class SynergySessionedChannel method pty.
@Override
public void pty(String term, int termWidthCharacters, int termHeightCharacters, int termWidthPixels, int termHeightPixels, Map<PTYMode, Integer> terminalModes) throws SshException {
final PseudoTerminalModes modes = new PseudoTerminalModes();
if (terminalModes != null) {
Collects.forEach(terminalModes, new Consumer2<PTYMode, Integer>() {
@Override
public void accept(PTYMode ptyMode, Integer value) {
try {
modes.setTerminalMode(ptyMode.getOpcodeInt(), value);
} catch (Throwable ex) {
// ignore it
}
}
});
}
this.channel.allocatePseudoTerminal(term, termWidthCharacters, termHeightCharacters, termWidthPixels, termHeightPixels, modes);
}
Aggregations