com.cloudtran.jmx
Class PingHelper

java.lang.Object
  extended by java.lang.Thread
      extended by com.cloudtran.jmx.PingHelper
All Implemented Interfaces:
Runnable

public class PingHelper
extends Thread

The purpose of this class to give information about ping times. The data will be displayed by the JMX bean.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 boolean doPing
           
 String hostAddress
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PingHelper(String hostName)
           
 
Method Summary
 String getHostAddress()
           
 Double getLastPingTime()
           
static void main(String[] args)
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

hostAddress

public volatile String hostAddress

doPing

public volatile boolean doPing
Constructor Detail

PingHelper

public PingHelper(String hostName)
Parameters:
hostName - the host name or ip address what should be pinged
Method Detail

main

public static void main(String[] args)
                 throws InterruptedException
Throws:
InterruptedException

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

getLastPingTime

public Double getLastPingTime()

getHostAddress

public String getHostAddress()