org.crsh.processor.jline
Class JLineProcessor

java.lang.Object
  extended by org.crsh.processor.jline.JLineProcessor
All Implemented Interfaces:
Runnable, jline.console.completer.Completer

public class JLineProcessor
extends Object
implements Runnable, jline.console.completer.Completer


Field Summary
(package private)  AtomicReference<ShellProcess> current
          .
(package private)  jline.console.ConsoleReader reader
          .
private  Shell shell
          .
(package private)  boolean useAlternate
          Whether or not we switched on the alternate screen.
(package private)  PrintWriter writer
          .
 
Constructor Summary
JLineProcessor(Shell shell, jline.console.ConsoleReader reader, PrintWriter writer)
           
 
Method Summary
 void cancel()
           
 int complete(String buffer, int cursor, List<CharSequence> candidates)
           
(package private)  String getPrompt()
           
private  void loop()
           
private  String readLine()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shell

private final Shell shell
.


reader

final jline.console.ConsoleReader reader
.


writer

final PrintWriter writer
.


current

final AtomicReference<ShellProcess> current
.


useAlternate

boolean useAlternate
Whether or not we switched on the alternate screen.

Constructor Detail

JLineProcessor

public JLineProcessor(Shell shell,
                      jline.console.ConsoleReader reader,
                      PrintWriter writer)
Method Detail

run

public void run()
Specified by:
run in interface Runnable

readLine

private String readLine()

loop

private void loop()

complete

public int complete(String buffer,
                    int cursor,
                    List<CharSequence> candidates)
Specified by:
complete in interface jline.console.completer.Completer

cancel

public void cancel()

getPrompt

String getPrompt()


Copyright © 2014 eXo Platform SAS. All Rights Reserved.