Package org.jenkinsci.main.modules.sshd
Class AsynchronousCommand
java.lang.Object
org.jenkinsci.main.modules.sshd.AsynchronousCommand
- 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 abstract class AsynchronousCommand
extends Object
implements org.apache.sshd.server.command.Command, org.apache.sshd.server.session.ServerSessionAware, Runnable
Partial
Command implementation that uses a thread to run a command.- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddestroy(org.apache.sshd.server.channel.ChannelSession channel) protected Userorg.apache.sshd.server.Environmentorg.apache.sshd.server.session.ServerSessionvoidrun()protected abstract intvoidvoidsetExitCallback(org.apache.sshd.server.ExitCallback callback) voidvoidvoidsetSession(org.apache.sshd.server.session.ServerSession session) voidstart(org.apache.sshd.server.channel.ChannelSession channel, org.apache.sshd.server.Environment env) voidstart(org.apache.sshd.server.Environment env)
-
Constructor Details
-
AsynchronousCommand
-
-
Method Details
-
setInputStream
- Specified by:
setInputStreamin interfaceorg.apache.sshd.server.command.CommandDirectInputStreamAware
-
setOutputStream
- Specified by:
setOutputStreamin interfaceorg.apache.sshd.server.command.CommandDirectOutputStreamAware
-
setErrorStream
- Specified by:
setErrorStreamin interfaceorg.apache.sshd.server.command.CommandDirectErrorStreamAware
-
getInputStream
-
getOutputStream
-
getErrorStream
-
getCmdLine
-
setExitCallback
public void setExitCallback(org.apache.sshd.server.ExitCallback callback) - Specified by:
setExitCallbackin interfaceorg.apache.sshd.server.command.Command
-
getSession
public org.apache.sshd.server.session.ServerSession getSession() -
setSession
public void setSession(org.apache.sshd.server.session.ServerSession session) - Specified by:
setSessionin interfaceorg.apache.sshd.server.session.ServerSessionAware
-
getCurrentUser
-
getEnvironment
public org.apache.sshd.server.Environment getEnvironment() -
start
public void start(org.apache.sshd.server.channel.ChannelSession channel, org.apache.sshd.server.Environment env) throws IOException - Specified by:
startin interfaceorg.apache.sshd.server.command.CommandLifecycle- Throws:
IOException
-
start
- Throws:
IOException
-
runCommand
- Throws:
Exception
-
run
public void run() -
destroy
- Specified by:
destroyin interfaceorg.apache.sshd.server.command.CommandLifecycle- Throws:
Exception
-
destroy
public void destroy()
-