Package org.crsh.console.jline

Examples of org.crsh.console.jline.JLineProcessor


          exited.set(true);
          callback.onExit(0);
          super.shutdown();
        }
      };
      JLineProcessor processor = new JLineProcessor(true, shell, reader, new PrintStream(out, false, encoding), "\r\n");
      processor.run();
    } catch (java.io.InterruptedIOException e) {
      // Expected behavior because of the onExit callback in the shutdown above
      // clear interrupted status on purpose
      Thread.interrupted();
    } catch (Exception e) {
View Full Code Here


      //
      FileInputStream in = new FileInputStream(FileDescriptor.in);
      ConsoleReader reader = new ConsoleReader(null, in, out, term);

      //
      final JLineProcessor processor = new JLineProcessor(ansi, shell, reader, out);

      //
      InterruptHandler interruptHandler = new InterruptHandler(new Runnable() {
        @Override
        public void run() {
          processor.interrupt();
        }
      });
      interruptHandler.install();

      //
      Thread thread = new Thread(processor);
      thread.setDaemon(true);
      thread.start();

      //
      try {
        processor.closed();
      }
      catch (Throwable t) {
        t.printStackTrace();
      }
      finally {
View Full Code Here

TOP

Related Classes of org.crsh.console.jline.JLineProcessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.