Top Description Methods
org.apache.sshd.server.shell

public Interface InvertedShell

extends SessionHolder<ServerSession>, ServerSessionHolder, ServerChannelSessionHolder, CommandLifecycle, ServerSessionAware
Known Direct Implementers
org.apache.sshd.server.shell.ProcessShell
Imports
java.io.InputStream, .OutputStream, org.apache.sshd.common.session.SessionHolder, org.apache.sshd.server.channel.ServerChannelSessionHolder, org.apache.sshd.server.command.CommandLifecycle, org.apache.sshd.server.session.ServerSession, .ServerSessionAware, .ServerSessionHolder

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 org.apache.sshd.common.Factory.
Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the exit value of the shell
exitValue
()

Retrieve the exit value of the shell.

public InputStream

Returns:

The InputStream representing the error stream of the shell
getErrorStream
()

public OutputStream

Returns:

The OutputStream used to feed the shell
getInputStream
()

Returns the output stream used to feed the shell.

public InputStream

Returns:

The InputStream representing the output stream of the shell
getOutputStream
()

public default ServerSession
public boolean

Returns:

true if alive
isAlive
()

Check if the underlying shell is still alive

Inherited from org.apache.sshd.common.session.SessionHolder:
getSessionContext
Inherited from org.apache.sshd.server.channel.ServerChannelSessionHolder:
getServerChannelSession
Inherited from org.apache.sshd.server.command.CommandLifecycle:
destroystart
Inherited from org.apache.sshd.server.session.ServerSessionAware:
setSession
Inherited from org.apache.sshd.server.session.ServerSessionHolder:
getServerSession

Method Detail

exitValueback to summary
public int exitValue()

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

Returns:int

the exit value of the shell

getErrorStreamback to summary
public InputStream getErrorStream()
Returns:InputStream

The InputStream representing the error stream of the shell

getInputStreamback to summary
public OutputStream getInputStream()

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

Returns:OutputStream

The OutputStream used to feed the shell

getOutputStreamback to summary
public InputStream getOutputStream()
Returns:InputStream

The InputStream representing the output stream of the shell

getSessionback to summary
public default ServerSession getSession()

Implements org.apache.sshd.common.session.SessionHolder.getSession.

Annotations
@Override
isAliveback to summary
public boolean isAlive()

Check if the underlying shell is still alive

Returns:boolean

true if alive