|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crsh.shell.concurrent.AsyncShell
public class AsyncShell
The async shell wraps a shell and provides command cancellation. The shell executes the command in a separate thread allowing using the wrapped shell to which it delegates the business command execution.
Field Summary | |
---|---|
(package private) boolean |
closed
. |
private AsyncProcess |
current
. |
(package private) CompletionService<AsyncProcess> |
executor
. |
(package private) Object |
lock
. |
(package private) Set<AsyncProcess> |
processes
. |
(package private) Shell |
shell
. |
Constructor Summary | |
---|---|
AsyncShell(Executor executor,
Shell shell)
|
Method Summary | |
---|---|
void |
close()
|
CommandCompletion |
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 |
---|
final Shell shell
private AsyncProcess current
final CompletionService<AsyncProcess> executor
boolean closed
final Object lock
final Set<AsyncProcess> processes
Constructor Detail |
---|
public AsyncShell(Executor executor, Shell shell)
Method Detail |
---|
public void close()
close
in interface Closeable
public String getWelcome()
Shell
getWelcome
in interface Shell
public String getPrompt()
Shell
getPrompt
in interface Shell
public CommandCompletion complete(String prefix)
Shell
complete
in interface Shell
prefix
- the prefix to complete
public AsyncProcess createProcess(String request)
Shell
createProcess
in interface Shell
request
- the request to process
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |