public class IPAddressDetector
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
IPAddressDetector(long interval,
NodeIPDetector detector) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkpoint()
Execute a checkpoint - detect our internet IP address and log it
|
void |
clearCached() |
java.net.InetAddress[] |
getAddress(Executor executor)
Fetches the currently detected IP address.
|
java.net.InetAddress[] |
getAddressNoCallback()
Fetch the currently detected IP address.
|
java.lang.String |
getCheckpointName() |
long |
nextCheckpoint() |
protected java.net.InetAddress |
oldDetect() |
protected void |
onGetAddresses(java.util.List<java.net.InetAddress> addrs)
Do something with the list of detected IP addresses.
|
void |
run() |
public IPAddressDetector(long interval, NodeIPDetector detector)
interval
- detector
- public java.lang.String getCheckpointName()
public long nextCheckpoint()
public java.net.InetAddress[] getAddressNoCallback()
public java.net.InetAddress[] getAddress(Executor executor)
protected boolean checkpoint()
protected java.net.InetAddress oldDetect()
protected void onGetAddresses(java.util.List<java.net.InetAddress> addrs)
addrs
- Vector of InetAddressespublic void run()
run
in interface java.lang.Runnable
public void clearCached()