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
ModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
void
destroy
(org.apache.sshd.server.channel.ChannelSession channel) protected User
org.apache.sshd.server.Environment
org.apache.sshd.server.session.ServerSession
void
run()
protected abstract int
void
void
setExitCallback
(org.apache.sshd.server.ExitCallback callback) void
void
void
setSession
(org.apache.sshd.server.session.ServerSession session) void
start
(org.apache.sshd.server.channel.ChannelSession channel, org.apache.sshd.server.Environment env) void
start
(org.apache.sshd.server.Environment env)
-
Constructor Details
-
AsynchronousCommand
-
-
Method Details
-
setInputStream
- Specified by:
setInputStream
in interfaceorg.apache.sshd.server.command.CommandDirectInputStreamAware
-
setOutputStream
- Specified by:
setOutputStream
in interfaceorg.apache.sshd.server.command.CommandDirectOutputStreamAware
-
setErrorStream
- Specified by:
setErrorStream
in interfaceorg.apache.sshd.server.command.CommandDirectErrorStreamAware
-
getInputStream
-
getOutputStream
-
getErrorStream
-
getCmdLine
-
setExitCallback
public void setExitCallback(org.apache.sshd.server.ExitCallback callback) - Specified by:
setExitCallback
in 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:
setSession
in 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:
start
in interfaceorg.apache.sshd.server.command.CommandLifecycle
- Throws:
IOException
-
start
- Throws:
IOException
-
runCommand
- Throws:
Exception
-
run
public void run() -
destroy
- Specified by:
destroy
in interfaceorg.apache.sshd.server.command.CommandLifecycle
- Throws:
Exception
-
destroy
public void destroy()
-