hudson.plugins.swarm
Class Client
java.lang.Object
hudson.plugins.swarm.Client
public class Client
- extends Object
Swarm client.
Discovers nearby Jenkins via UDP broadcast, and pick eligible one randomly and
joins it.
- Author:
- Kohsuke Kawaguchi
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
target
protected hudson.plugins.swarm.Client.Candidate target
- The Jenkins that we are trying to connect to.
name
public String name
description
public String description
labels
public List<String> labels
remoteFsRoot
public File remoteFsRoot
executors
public int executors
master
public String master
autoDiscoveryAddress
public String autoDiscoveryAddress
disableSslVerification
public boolean disableSslVerification
mode
public String mode
username
public String username
password
public String password
help
public boolean help
Client
public Client()
throws IOException
- Throws:
IOException
main
public static void main(String... args)
throws InterruptedException,
IOException
- Throws:
InterruptedException
IOException
run
public void run()
throws InterruptedException
- Finds a Jenkins master that supports swarming, and join it.
This method never returns.
- Throws:
InterruptedException
discoverFromBroadcast
protected hudson.plugins.swarm.Client.Candidate discoverFromBroadcast()
throws IOException,
InterruptedException,
RetryException,
ParserConfigurationException
- Throws:
IOException
InterruptedException
RetryException
ParserConfigurationException
sendBroadcast
protected void sendBroadcast(DatagramSocket socket)
throws IOException
- Throws:
IOException
collectBroadcastResponses
protected List<DatagramPacket> collectBroadcastResponses(DatagramSocket socket)
throws IOException,
RetryException
- Throws:
IOException
RetryException
connect
protected void connect()
throws InterruptedException
- This method blocks while the swarm slave is serving as a slave.
Interrupt the thread to abort it and return.
- Throws:
InterruptedException
createHttpClient
protected org.apache.commons.httpclient.HttpClient createHttpClient(URL urlForAuth)
createSwarmSlave
protected void createSwarmSlave()
throws IOException,
InterruptedException,
RetryException
- Throws:
IOException
InterruptedException
RetryException
verifyThatUrlIsHudson
protected void verifyThatUrlIsHudson()
throws InterruptedException,
RetryException
- Throws:
InterruptedException
RetryException
Copyright © 2004-2014. All Rights Reserved.