MicroTAPAS.mobility
Class MicroPingClient

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--MicroTAPAS.mobility.MicroPingClient
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable

public class MicroPingClient
extends java.lang.Thread
implements java.io.Serializable

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.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MicroPingClient(MicroTAPAS.mobility.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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MicroPingClient

public MicroPingClient(MicroTAPAS.mobility.MobilitySupportActor pParent)
Constructor

Method Detail

run

public void run()
Run method that starts this thread

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

destroy

public void destroy()
Destroy method

Overrides:
destroy in class java.lang.Thread

pingLoop

public void pingLoop()
              throws java.lang.Exception
Main procedure in this thread

java.lang.Exception

hasTerminalMoved

public boolean hasTerminalMoved()
Compares the old stored IP to the current IP to determine if a terminal has moved from one domain to another.

Returns:
A boolean indicating whether the terminal has moved.

status

public Item status()
Status report of MicroPingClient in Item hierarchy of information elements.

Returns:
Hierarchy of Item information elements