|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--MicroTAPAS.mobility.MicroPingClient
This class sends ping requests at certain intervals. This class operates in one
of two modes:
1) MobilityManager: Pings all nodes that are 'connected' to this MM,
2) MobilityAgent: Pings its own Director node. The interval between pings
is determined dynamically, where loss of connetcion will cut the current
interval in half, and a online connection of more than 10*initial interval
will increase the current interval by the initial interval.
| Field Summary | |
private AddressMonitor |
am
|
private long |
currentInterval
Current interval between pings. |
private static boolean |
DEBUG
Determines whether debug info to be sent to debug-server |
private long |
intervalMax
Max interval between pings. |
private long |
intervalMin
Min interval between pings. |
private boolean |
isActive
Indicates whether this client is active or not. |
private boolean |
isMMNode
Whether this node is a MM node. |
private MobilitySupportActor |
parent
Reference to the parent MicroConnectionManager. |
private int |
pingPort
Socket port to send requests to. |
private java.lang.String |
selfNode
Variable that holds the current IP address of this node. |
private java.net.Socket |
socket
Client socket used in pinging pingServer(s). |
private long |
startInterval
Initial interval between pings. |
private long |
startTime
Start time of this client. |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
MicroPingClient(MobilitySupportActor pParent)
Constructor |
|
| Method Summary | |
void |
destroy()
Destroy method |
boolean |
hasTerminalMoved()
Compares the old stored IP to the current IP to determine if a terminal has moved from one domain to another. |
void |
pingLoop()
Main procedure in this thread |
void |
run()
Run method that starts this thread |
Item |
status()
Status report of MicroPingClient in Item hierarchy of information elements. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static final boolean DEBUG
private int pingPort
private long startInterval
private long currentInterval
private long intervalMax
private long intervalMin
private long startTime
private MobilitySupportActor parent
private AddressMonitor am
private boolean isMMNode
private java.net.Socket socket
private boolean isActive
private java.lang.String selfNode
| Constructor Detail |
public MicroPingClient(MobilitySupportActor pParent)
| Method Detail |
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void destroy()
destroy in class java.lang.Thread
public void pingLoop()
throws java.lang.Exception
java.lang.Exceptionpublic boolean hasTerminalMoved()
public Item status()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||