org.apache.sshd.server.shell
Class ProcessShellFactory.ProcessShell

java.lang.Object
  extended by org.apache.sshd.server.shell.ProcessShellFactory.ProcessShell
All Implemented Interfaces:
InvertedShell
Enclosing class:
ProcessShellFactory

public class ProcessShellFactory.ProcessShell
extends Object
implements InvertedShell


Nested Class Summary
protected  class ProcessShellFactory.ProcessShell.TtyFilterInputStream
           
protected  class ProcessShellFactory.ProcessShell.TtyFilterOutputStream
           
 
Constructor Summary
ProcessShellFactory.ProcessShell()
           
 
Method Summary
 void destroy()
          Destroy the shell.
 int exitValue()
          Retrieve the exit value of the shell.
 InputStream getErrorStream()
          Return an InputStream representing the error stream of the shell.
 OutputStream getInputStream()
          Returns the output stream used to feed the shell.
 InputStream getOutputStream()
          Return an InputStream representing the output stream of the shell.
 boolean isAlive()
          Check if the underlying shell is still alive
 void start(Map<String,String> env)
          Starts the shell and will make the streams available for the ssh server to retrieve and use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessShellFactory.ProcessShell

public ProcessShellFactory.ProcessShell()
Method Detail

start

public void start(Map<String,String> env)
           throws IOException
Description copied from interface: InvertedShell
Starts the shell and will make the streams available for the ssh server to retrieve and use.

Specified by:
start in interface InvertedShell
Throws:
IOException

getInputStream

public OutputStream getInputStream()
Description copied from interface: InvertedShell
Returns the output stream used to feed the shell. This method is called after the shell has been started.

Specified by:
getInputStream in interface InvertedShell
Returns:

getOutputStream

public InputStream getOutputStream()
Description copied from interface: InvertedShell
Return an InputStream representing the output stream of the shell.

Specified by:
getOutputStream in interface InvertedShell
Returns:

getErrorStream

public InputStream getErrorStream()
Description copied from interface: InvertedShell
Return an InputStream representing the error stream of the shell.

Specified by:
getErrorStream in interface InvertedShell
Returns:

isAlive

public boolean isAlive()
Description copied from interface: InvertedShell
Check if the underlying shell is still alive

Specified by:
isAlive in interface InvertedShell
Returns:

exitValue

public int exitValue()
Description copied from interface: InvertedShell
Retrieve the exit value of the shell. This method must only be called when the shell is not alive anymore.

Specified by:
exitValue in interface InvertedShell
Returns:
the exit value of the shell

destroy

public void destroy()
Description copied from interface: InvertedShell
Destroy the shell. This method can be called by the SSH server to destroy the shell because the client has disconnected somehow.

Specified by:
destroy in interface InvertedShell


Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.