org.jenkinsci.plugins.checkssh
Class SshProcessManager

java.lang.Object
  extended by org.jenkinsci.plugins.checkssh.SshProcessManager
All Implemented Interfaces:
hudson.model.Describable<SshProcessManager>

public class SshProcessManager
extends Object
implements hudson.model.Describable<SshProcessManager>

Author:
Lucie Votypkova

Nested Class Summary
static class SshProcessManager.DescriptorImpl
           
 
Constructor Summary
SshProcessManager(String userName)
           
 
Method Summary
 hudson.model.Descriptor<SshProcessManager> getDescriptor()
           
static SshProcessManager getManager()
          Return instance of class SshProcessManager
 List<hudson.util.ProcessTree.OSProcess> getSshProcessForSlave(String hostName)
          Find all ssh processes on Jenkins Master, which connect to a given hostname
 String getUserName()
           
 boolean killSshProcess(hudson.util.ProcessTree.OSProcess process)
          Try to kill given process and its subprocesses
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SshProcessManager

public SshProcessManager(String userName)
Method Detail

getSshProcessForSlave

public List<hudson.util.ProcessTree.OSProcess> getSshProcessForSlave(String hostName)
                                                              throws IOException,
                                                                     InterruptedException
Find all ssh processes on Jenkins Master, which connect to a given hostname

Parameters:
hostname - of computer on which is the ssh process connect to
Throws:
IOException
InterruptedException

getManager

public static SshProcessManager getManager()
Return instance of class SshProcessManager


getUserName

public String getUserName()

killSshProcess

public boolean killSshProcess(hudson.util.ProcessTree.OSProcess process)
                       throws InterruptedException,
                              IOException
Try to kill given process and its subprocesses

Returns:
true if the process was killed, false if not.
Throws:
InterruptedException
IOException

getDescriptor

public hudson.model.Descriptor<SshProcessManager> getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<SshProcessManager>


Copyright © 2004-2012. All Rights Reserved.