org.mbari.siam.distributed
Class Subnode

java.lang.Object
  extended by org.mbari.siam.distributed.Subnode
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MOOSSubnode

public class Subnode
extends java.lang.Object
implements java.io.Serializable

This class represents a subnode. A subnode periodically contacts its parent node. The 'contact time' is the time the parent node last had contact from the subnode, expressed in msec since epoch.

See Also:
Serialized Form

Field Summary
protected  java.net.InetAddress _address
           
protected  long _contactTimestamp
           
protected  long _deviceID
           
 
Constructor Summary
Subnode(java.net.InetAddress address, long t, long deviceID)
           
 
Method Summary
 java.net.InetAddress getAddress()
          Get subnode's address
 long getContactTime()
          Get time of most recent contact from subnode.
 void setContactTime(long t)
          Set time of most recent contact from subnode.
 java.lang.String toString()
          Output String representation.
 void update(long contactTime, NodeNotifyMessage info)
          Update subnode fields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_address

protected java.net.InetAddress _address

_contactTimestamp

protected long _contactTimestamp

_deviceID

protected long _deviceID
Constructor Detail

Subnode

public Subnode(java.net.InetAddress address,
               long t,
               long deviceID)
Method Detail

getAddress

public java.net.InetAddress getAddress()
Get subnode's address


setContactTime

public void setContactTime(long t)
Set time of most recent contact from subnode.


getContactTime

public long getContactTime()
Get time of most recent contact from subnode.


update

public void update(long contactTime,
                   NodeNotifyMessage info)
Update subnode fields


toString

public java.lang.String toString()
Output String representation.

Overrides:
toString in class java.lang.Object


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.