com.continuent.tungsten.common.network
Class InetAddressPing

java.lang.Object
  extended by com.continuent.tungsten.common.network.InetAddressPing
All Implemented Interfaces:
PingMethod

public class InetAddressPing
extends java.lang.Object
implements PingMethod

Tests for reachability using the Java InetAddress.isReachable() method.

Author:
Robert Hodges

Constructor Summary
InetAddressPing()
           
 
Method Summary
 java.lang.String getNotes()
          Return a string describing what this ping method did.
 boolean ping(HostAddress address, int timeout)
          Tests a host for reachability.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InetAddressPing

public InetAddressPing()
Method Detail

ping

public boolean ping(HostAddress address,
                    int timeout)
             throws HostException
Tests a host for reachability.

Specified by:
ping in interface PingMethod
Parameters:
address - Host name
timeout - Timeout in milliseconds
Returns:
True if host is reachable, otherwise false.
Throws:
HostException

getNotes

public java.lang.String getNotes()
Return a string describing what this ping method did. They should be set even if the ping method returns an exception.

Specified by:
getNotes in interface PingMethod
See Also:
PingMethod.getNotes()