Interface InvertedShell

All Superinterfaces:
CommandLifecycle, ServerChannelSessionHolder, ServerSessionAware, ServerSessionHolder, SessionContextHolder, SessionHolder<ServerSession>
All Known Implementing Classes:
ProcessShell

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 Details

    • getSession

      default ServerSession getSession()
      Specified by:
      getSession in interface SessionHolder<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 OutputStream used to feed the shell
    • getOutputStream

      InputStream getOutputStream()
      Returns:
      The InputStream representing the output stream of the shell
    • getErrorStream

      InputStream getErrorStream()
      Returns:
      The InputStream representing the error stream of the shell
    • isAlive

      boolean isAlive()
      Check if the underlying shell is still alive
      Returns:
      true if 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