org.apache.sshd.server.shell
Interface InvertedShell

All Known Implementing Classes:
ProcessShellFactory.ProcessShell

public interface InvertedShell

This shell have inverted streams, such as the one obtained when launching a new Process from java. This interface is meant to be used with InvertedShellWrapper class as an implementation of Factory.

Author:
Apache MINA SSHD Project

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.
 

Method Detail

start

void start(Map<String,String> env)
           throws IOException
Starts the shell and will make the streams available for the ssh server to retrieve and use.

Parameters:
env -
Throws:
Exception
IOException

getInputStream

OutputStream getInputStream()
Returns the output stream used to feed the shell. This method is called after the shell has been started.

Returns:

getOutputStream

InputStream getOutputStream()
Return an InputStream representing the output stream of the shell.

Returns:

getErrorStream

InputStream getErrorStream()
Return an InputStream representing the error stream of the shell.

Returns:

isAlive

boolean isAlive()
Check if the underlying shell is still alive

Returns:

exitValue

int exitValue()
Retrieve the exit value of the shell. This method must only be called when the shell is not alive anymore.

Returns:
the exit value of the shell

destroy

void destroy()
Destroy the shell. This method can be called by the SSH server to destroy the shell because the client has disconnected somehow.



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