public class InvertedShellWrapper extends Object implements Command
InvertedShell
as a ShellFactory.Shell. This is useful when using external
processes.
When starting the shell, this wrapper will also create a thread used
to pump the streams and also to check if the shell is alive.| Constructor and Description |
|---|
InvertedShellWrapper(InvertedShell shell) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy the shell.
|
protected void |
pumpStreams() |
void |
setErrorStream(OutputStream err)
Set the error stream that can be used by the shell to write its errors.
|
void |
setExitCallback(ExitCallback callback)
Set the callback that the shell has to call when it is closed.
|
void |
setInputStream(InputStream in)
Set the input stream that can be used by the shell to read input.
|
void |
setOutputStream(OutputStream out)
Set the output stream that can be used by the shell to write its output.
|
void |
start(Environment env)
Starts the shell.
|
public InvertedShellWrapper(InvertedShell shell)
public void setInputStream(InputStream in)
CommandsetInputStream in interface Commandpublic void setOutputStream(OutputStream out)
CommandsetOutputStream in interface Commandpublic void setErrorStream(OutputStream err)
CommandsetErrorStream in interface Commandpublic void setExitCallback(ExitCallback callback)
CommandsetExitCallback in interface Commandpublic void start(Environment env) throws IOException
Command
Thread(this).start();
start in interface CommandIOExceptionpublic void destroy()
Commandprotected void pumpStreams()
Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.