Class Command

  • All Implemented Interfaces:
    Runnable, 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, org.apache.sshd.server.session.ServerSessionAware

    public class Command
    extends Object
    implements org.apache.sshd.server.command.Command, org.apache.sshd.server.session.ServerSessionAware, Runnable
    • Method Detail

      • 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
      • destroy

        public void destroy​(org.apache.sshd.server.channel.ChannelSession channel)
                     throws Exception
        Specified by:
        destroy in interface org.apache.sshd.server.command.CommandLifecycle
        Throws:
        Exception
      • setSession

        public void setSession​(org.apache.sshd.server.session.ServerSession session)
        Specified by:
        setSession in interface org.apache.sshd.server.session.ServerSessionAware
      • run

        public void run()
        Specified by:
        run in interface Runnable