@Extension
public class Pinger
extends hudson.model.PeriodicWork
For example, if the domain name is "myjenkins.foo.bar.com", then this class will try to report our location to "discover-jenkins.foo.bar.com" or "discover-jenkins.bar.com".
This code uses public suffix list to avoid reporting to "discover-jenkins.com", as that would allow the owner of this regular domain name to collect Jenkins usages in all the .com domains, which is clearly not what we want.
| Constructor and Description |
|---|
Pinger() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doRun() |
long |
getRecurrencePeriod()
Runs once a day.
|
protected void |
handle(String hostName) |
protected void |
reportTo(String name) |
cancel, scheduledExecutionTimepublic long getRecurrencePeriod()
getRecurrencePeriod in class hudson.model.PeriodicWorkprotected void doRun()
throws Exception
doRun in class hudson.triggers.SafeTimerTaskExceptionprotected void handle(String hostName) throws IOException
IOExceptionprotected void reportTo(String name) throws IOException
IOExceptionCopyright © 2004-2014. All Rights Reserved.