Class ShellCommand

java.lang.Object
org.jline.builtins.ssh.ShellCommand
All Implemented Interfaces:
org.apache.sshd.server.command.Command, org.apache.sshd.server.command.CommandDirectErrorStreamAware, org.apache.sshd.server.command.CommandDirectInputStreamAware, org.apache.sshd.server.command.CommandDirectOutputStreamAware, org.apache.sshd.server.command.CommandDirectStreamsAware, org.apache.sshd.server.command.CommandLifecycle

public class ShellCommand extends Object implements org.apache.sshd.server.command.Command
  • Field Details

    • LOGGER

      private static final Logger LOGGER
    • execute

      private final Consumer<Ssh.ExecuteParams> execute
    • command

      private final String command
    • in

      private InputStream in
    • out

      private OutputStream out
    • err

      private OutputStream err
    • callback

      private org.apache.sshd.server.ExitCallback callback
    • session

      private org.apache.sshd.server.session.ServerSession session
    • env

      private org.apache.sshd.server.Environment env
  • Constructor Details

  • Method Details

    • setInputStream

      public void setInputStream(InputStream in)
      Specified by:
      setInputStream in interface org.apache.sshd.server.command.CommandDirectInputStreamAware
    • setOutputStream

      public void setOutputStream(OutputStream out)
      Specified by:
      setOutputStream in interface org.apache.sshd.server.command.CommandDirectOutputStreamAware
    • setErrorStream

      public void setErrorStream(OutputStream err)
      Specified by:
      setErrorStream in interface org.apache.sshd.server.command.CommandDirectErrorStreamAware
    • setExitCallback

      public void setExitCallback(org.apache.sshd.server.ExitCallback callback)
      Specified by:
      setExitCallback in interface org.apache.sshd.server.command.Command
    • start

      public void start(org.apache.sshd.server.channel.ChannelSession channel, org.apache.sshd.server.Environment env) throws IOException
      Specified by:
      start in interface org.apache.sshd.server.command.CommandLifecycle
      Throws:
      IOException
    • run

      private void run()
    • destroy

      public void destroy(org.apache.sshd.server.channel.ChannelSession channel)
      Specified by:
      destroy in interface org.apache.sshd.server.command.CommandLifecycle