Class SshTestGitServer.EchoCommand
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.server.command.AbstractCommandSupport
org.eclipse.jgit.junit.ssh.SshTestGitServer.EchoCommand
- All Implemented Interfaces:
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.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, org.apache.sshd.server.session.ServerSessionHolder
- 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.
- Since:
- 5.2
-
Field Summary
Fields inherited from class org.apache.sshd.server.command.AbstractCommandSupport
cbCalled, cmdRunner, executorServiceFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEchoCommand(String command, org.apache.sshd.common.util.threads.CloseableExecutorService executorService) -
Method Summary
Modifier and TypeMethodDescriptionprivate voiddoEcho(String text, OutputStream stream) voidrun()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, toStringMethods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
Constructor Details
-
EchoCommand
protected EchoCommand(String command, org.apache.sshd.common.util.threads.CloseableExecutorService executorService)
-
-
Method Details
-
run
public void run() -
doEcho
- Throws:
IOException
-