|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.sshd.server.shell.InvertedShellWrapper
public class InvertedShellWrapper
A shell implementation that wraps an instance of 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.
| Field Summary | |
|---|---|
static int |
DEFAULT_BUFFER_SIZE
default buffer size for the IO pumps. |
| Constructor Summary | |
|---|---|
InvertedShellWrapper(InvertedShell shell)
|
|
InvertedShellWrapper(InvertedShell shell,
java.util.concurrent.Executor executor)
|
|
InvertedShellWrapper(InvertedShell shell,
java.util.concurrent.Executor executor,
int bufferSize)
|
|
InvertedShellWrapper(InvertedShell shell,
int bufferSize)
|
|
| Method Summary | |
|---|---|
void |
destroy()
Destroy the shell. |
protected void |
pumpStreams()
|
void |
setErrorStream(java.io.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(java.io.InputStream in)
Set the input stream that can be used by the shell to read input. |
void |
setOutputStream(java.io.OutputStream out)
Set the output stream that can be used by the shell to write its output. |
void |
setSession(ServerSession session)
Set the server session in which this shell will be executed. |
void |
start(Environment env)
Starts the shell. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_BUFFER_SIZE
| Constructor Detail |
|---|
public InvertedShellWrapper(InvertedShell shell)
public InvertedShellWrapper(InvertedShell shell,
java.util.concurrent.Executor executor)
public InvertedShellWrapper(InvertedShell shell,
int bufferSize)
public InvertedShellWrapper(InvertedShell shell,
java.util.concurrent.Executor executor,
int bufferSize)
| Method Detail |
|---|
public void setInputStream(java.io.InputStream in)
Command
setInputStream in interface Commandpublic void setOutputStream(java.io.OutputStream out)
Command
setOutputStream in interface Commandpublic void setErrorStream(java.io.OutputStream err)
Command
setErrorStream in interface Commandpublic void setExitCallback(ExitCallback callback)
Command
setExitCallback in interface Commandpublic void setSession(ServerSession session)
SessionAware
setSession in interface SessionAware
public void start(Environment env)
throws java.io.IOException
Command
Thread(this).start();
start in interface Commandjava.io.IOExceptionpublic void destroy()
Command
destroy in interface Commandprotected void pumpStreams()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||