public class SwarmClient extends Object
| Constructor and Description |
|---|
SwarmClient(Options options) |
| Modifier and Type | Method and Description |
|---|---|
protected List<DatagramPacket> |
collectBroadcastResponses(DatagramSocket socket) |
protected void |
connect(Candidate target)
This method blocks while the swarm slave is serving as a slave.
|
protected org.apache.commons.httpclient.HttpClient |
createHttpClient(URL urlForAuth) |
protected void |
createSwarmSlave(Candidate target) |
Candidate |
discoverFromBroadcast() |
Candidate |
discoverFromMasterUrl() |
String |
getHash() |
static String |
hash(File remoteFsRoot)
Returns a hash that should be consistent for any individual swarm client (as long as it has a persistent IP)
and should be unique to that client.
|
protected void |
sendBroadcast(DatagramSocket socket) |
protected void |
verifyThatUrlIsHudson(Candidate target) |
public SwarmClient(Options options)
public String getHash()
public Candidate discoverFromBroadcast() throws IOException, RetryException, ParserConfigurationException
protected void sendBroadcast(DatagramSocket socket) throws IOException
IOExceptionprotected List<DatagramPacket> collectBroadcastResponses(DatagramSocket socket) throws IOException, RetryException
IOExceptionRetryExceptionpublic Candidate discoverFromMasterUrl() throws IOException, ParserConfigurationException, RetryException
protected void connect(Candidate target) throws InterruptedException
target - candidateInterruptedExceptionprotected org.apache.commons.httpclient.HttpClient createHttpClient(URL urlForAuth)
protected void createSwarmSlave(Candidate target) throws IOException, InterruptedException, RetryException
protected void verifyThatUrlIsHudson(Candidate target) throws InterruptedException, RetryException
InterruptedExceptionRetryExceptionpublic static String hash(File remoteFsRoot)
remoteFsRoot - the file system root should be part of the hash (to support multiple swarm clients from
the same machine)Copyright © 2004-2016. All Rights Reserved.