org.jline.terminal.Terminal.close()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(205)

本文整理了Java中org.jline.terminal.Terminal.close()方法的一些代码示例,展示了Terminal.close()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Terminal.close()方法的具体详情如下:
包路径:org.jline.terminal.Terminal
类名称:Terminal
方法名:close

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) {

相关文章