org.crsh.shell.impl.async
Class AsyncShell

java.lang.Object
  extended by org.crsh.shell.impl.async.AsyncShell
All Implemented Interfaces:
Closeable, Shell

public class AsyncShell
extends Object
implements Shell, Closeable


Field Summary
(package private)  boolean closed
          .
private  AsyncProcess current
          .
(package private)  ExecutorService executor
          .
(package private)  Object lock
          .
(package private)  Set<AsyncProcess> processes
          .
(package private)  Shell shell
          .
 
Constructor Summary
AsyncShell(ExecutorService executor, Shell shell)
           
 
Method Summary
 void close()
           
 CompletionMatch complete(String prefix)
          Completion.
 AsyncProcess createProcess(String request)
          Process a request.
 String getPrompt()
          Returns the shell prompt.
 String getWelcome()
          Returns the welcome message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shell

final Shell shell
.


current

private AsyncProcess current
.


executor

final ExecutorService executor
.


closed

boolean closed
.


lock

final Object lock
.


processes

final Set<AsyncProcess> processes
.

Constructor Detail

AsyncShell

public AsyncShell(ExecutorService executor,
                  Shell shell)
Method Detail

close

public void close()
Specified by:
close in interface Closeable

getWelcome

public String getWelcome()
Description copied from interface: Shell
Returns the welcome message.

Specified by:
getWelcome in interface Shell
Returns:
the welcome message

getPrompt

public String getPrompt()
Description copied from interface: Shell
Returns the shell prompt.

Specified by:
getPrompt in interface Shell
Returns:
the shell prompt

complete

public CompletionMatch complete(String prefix)
Description copied from interface: Shell
Completion.

Specified by:
complete in interface Shell
Parameters:
prefix - the prefix to complete
Returns:
the sorted list of available suffixes

createProcess

public AsyncProcess createProcess(String request)
Description copied from interface: Shell
Process a request.

Specified by:
createProcess in interface Shell
Parameters:
request - the request to process
Returns:
the process


Copyright © 2014 eXo Platform SAS. All Rights Reserved.