Class SshTestGitServer.EchoCommand

  • All Implemented Interfaces:
    java.lang.Runnable, org.apache.sshd.common.session.SessionContextHolder, org.apache.sshd.common.session.SessionHolder<org.apache.sshd.server.session.ServerSession>, org.apache.sshd.common.util.threads.ExecutorServiceCarrier, org.apache.sshd.server.command.Command, org.apache.sshd.server.command.CommandLifecycle, org.apache.sshd.server.session.ServerSessionHolder, org.apache.sshd.server.SessionAware
    Enclosing class:
    SshTestGitServer

    private static class SshTestGitServer.EchoCommand
    extends org.apache.sshd.server.command.AbstractCommandSupport
    Simple echo command that echoes back the command string. If the first argument is a positive integer, it's taken as a delay (in seconds) before replying. Assumes UTF-8 character encoding.
    • Field Summary

      • Fields inherited from class org.apache.sshd.server.command.AbstractCommandSupport

        callback, cbCalled, cmdFuture, cmdRunner, command, environment, err, executorService, in, out, serverSession
      • Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean

        log
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected EchoCommand​(java.lang.String command, org.apache.sshd.common.util.threads.CloseableExecutorService executorService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void doEcho​(java.lang.String text, java.io.OutputStream stream)  
      void run()  
      • Methods inherited from class org.apache.sshd.server.command.AbstractCommandSupport

        destroy, getCommand, getEnvironment, getErrorStream, getExecutorService, getExitCallback, getInputStream, getOutputStream, getServerSession, getSession, getStartedCommandFuture, onExit, onExit, setErrorStream, setExitCallback, setInputStream, setOutputStream, setSession, start, toString
      • Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean

        getSimplifiedLogger
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.sshd.common.session.SessionHolder

        getSessionContext
    • Constructor Detail

      • EchoCommand

        protected EchoCommand​(java.lang.String command,
                              org.apache.sshd.common.util.threads.CloseableExecutorService executorService)
    • Method Detail

      • run

        public void run()
      • doEcho

        private void doEcho​(java.lang.String text,
                            java.io.OutputStream stream)
                     throws java.io.IOException
        Throws:
        java.io.IOException