Package org.apache.sshd.server.shell
Interface InvertedShell
-
- All Superinterfaces:
CommandLifecycle,ServerChannelSessionHolder,ServerSessionAware,ServerSessionHolder,SessionContextHolder,SessionHolder<ServerSession>
- All Known Implementing Classes:
ProcessShell
public interface InvertedShell extends SessionHolder<ServerSession>, ServerSessionHolder, ServerChannelSessionHolder, CommandLifecycle, ServerSessionAware
This shell have inverted streams, such as the one obtained when launching a newProcessfrom java. This interface is meant to be used withInvertedShellWrapperclass as an implementation ofFactory.- Author:
- Apache MINA SSHD Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description intexitValue()Retrieve the exit value of the shell.InputStreamgetErrorStream()OutputStreamgetInputStream()Returns the output stream used to feed the shell.InputStreamgetOutputStream()default ServerSessiongetSession()booleanisAlive()Check if the underlying shell is still alive-
Methods inherited from interface org.apache.sshd.server.command.CommandLifecycle
destroy, start
-
Methods inherited from interface org.apache.sshd.server.channel.ServerChannelSessionHolder
getServerChannelSession
-
Methods inherited from interface org.apache.sshd.server.session.ServerSessionAware
setSession
-
Methods inherited from interface org.apache.sshd.server.session.ServerSessionHolder
getServerSession
-
Methods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
-
-
-
Method Detail
-
getSession
default ServerSession getSession()
- Specified by:
getSessionin interfaceSessionHolder<ServerSession>
-
getInputStream
OutputStream getInputStream()
Returns the output stream used to feed the shell. This method is called after the shell has been started.- Returns:
- The
OutputStreamused to feed the shell
-
getOutputStream
InputStream getOutputStream()
- Returns:
- The
InputStreamrepresenting the output stream of the shell
-
getErrorStream
InputStream getErrorStream()
- Returns:
- The
InputStreamrepresenting the error stream of the shell
-
isAlive
boolean isAlive()
Check if the underlying shell is still alive- Returns:
trueif alive
-
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
-
-