org.mbari.siam.utils
Class NodeProbe

java.lang.Object
  extended by org.mbari.siam.utils.NodeProbe

public class NodeProbe
extends java.lang.Object

NodeProbe tests for network connectivity to a specified IP address and port number.


Field Summary
 boolean _status
          return status true if available (socket attempt successful) false otherwise
 
Constructor Summary
NodeProbe()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 boolean probe(java.net.InetAddress addr, int port, long timeoutMillis)
          The probe method creates a ProbeWorker to contact the specified host.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_status

public boolean _status
return status true if available (socket attempt successful) false otherwise

Constructor Detail

NodeProbe

public NodeProbe()
Method Detail

probe

public boolean probe(java.net.InetAddress addr,
                     int port,
                     long timeoutMillis)
              throws java.lang.Exception
The probe method creates a ProbeWorker to contact the specified host. The socket call can take several minutes (~3) to time out, so probe waits until the specified timeout has expired abd then interrupts the thread and exits.

Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.