org.crsh.shell.concurrent
Class AsyncShell

java.lang.Object
  extended by org.crsh.shell.concurrent.AsyncShell
All Implemented Interfaces:
Shell

public class AsyncShell
extends Object
implements Shell

Version:
$Revision$
Author:
Julien Viet

Nested Class Summary
private  class AsyncShell.Process
           
 
Field Summary
private  AsyncShell.Process current
          .
private  ExecutorService executor
          .
private  Object lock
          .
private  Shell shell
          .
private  Status status
          .
 
Constructor Summary
AsyncShell(ExecutorService executor, Shell shell)
           
 
Method Summary
 void close()
           
 Map<String,String> complete(String prefix)
          Completion.
 ShellProcess createProcess(String request)
          Process a request.
 String getPrompt()
          Returns the shell prompt.
 Status getStatus()
           
 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

lock

private final Object lock
.


status

private Status status
.


shell

private Shell shell
.


current

private AsyncShell.Process current
.


executor

private final ExecutorService executor
.

Constructor Detail

AsyncShell

public AsyncShell(ExecutorService executor,
                  Shell shell)
Method Detail

getStatus

public Status getStatus()

close

public void close()

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 Map<String,String> 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 ShellProcess 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 © 2011 eXo Platform SAS. All Rights Reserved.