org.jenkinsci.main.modules.sshd
Class AsynchronousCommand

java.lang.Object
  extended by org.jenkinsci.main.modules.sshd.AsynchronousCommand
All Implemented Interfaces:
org.apache.sshd.server.Command, org.apache.sshd.server.SessionAware

public abstract class AsynchronousCommand
extends Object
implements org.apache.sshd.server.Command, org.apache.sshd.server.SessionAware

Partial Command implementation that uses a thread to run a command.

Author:
Kohsuke Kawaguchi

Constructor Summary
protected AsynchronousCommand(SshCommandFactory.CommandLine cmdLine)
           
 
Method Summary
 void destroy()
           
 SshCommandFactory.CommandLine getCmdLine()
           
protected  hudson.model.User getCurrentUser()
           
 org.apache.sshd.server.Environment getEnvironment()
           
 OutputStream getErrorStream()
           
 InputStream getInputStream()
           
 OutputStream getOutputStream()
           
 org.apache.sshd.server.session.ServerSession getSession()
           
protected abstract  int run()
           
 void setErrorStream(OutputStream err)
           
 void setExitCallback(org.apache.sshd.server.ExitCallback callback)
           
 void setInputStream(InputStream in)
           
 void setOutputStream(OutputStream out)
           
 void setSession(org.apache.sshd.server.session.ServerSession session)
           
 void start(org.apache.sshd.server.Environment env)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsynchronousCommand

protected AsynchronousCommand(SshCommandFactory.CommandLine cmdLine)
Method Detail

setInputStream

public void setInputStream(InputStream in)
Specified by:
setInputStream in interface org.apache.sshd.server.Command

setOutputStream

public void setOutputStream(OutputStream out)
Specified by:
setOutputStream in interface org.apache.sshd.server.Command

setErrorStream

public void setErrorStream(OutputStream err)
Specified by:
setErrorStream in interface org.apache.sshd.server.Command

getInputStream

public InputStream getInputStream()

getOutputStream

public OutputStream getOutputStream()

getErrorStream

public OutputStream getErrorStream()

getCmdLine

public SshCommandFactory.CommandLine getCmdLine()

setExitCallback

public void setExitCallback(org.apache.sshd.server.ExitCallback callback)
Specified by:
setExitCallback in interface org.apache.sshd.server.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 interface org.apache.sshd.server.SessionAware

getCurrentUser

protected hudson.model.User getCurrentUser()

getEnvironment

public org.apache.sshd.server.Environment getEnvironment()

start

public void start(org.apache.sshd.server.Environment env)
           throws IOException
Specified by:
start in interface org.apache.sshd.server.Command
Throws:
IOException

run

protected abstract int run()
                    throws Exception
Throws:
Exception

destroy

public void destroy()
Specified by:
destroy in interface org.apache.sshd.server.Command


Copyright © 2004-2012. All Rights Reserved.