org.mbari.siam.core
Class SubnodeListener

java.lang.Object
  extended by java.lang.Thread
      extended by org.mbari.siam.core.SubnodeListener
All Implemented Interfaces:
java.lang.Runnable

public class SubnodeListener
extends java.lang.Thread

SubnodeListener listens for contacts from subnodes, and maintains list of of subnodes.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  java.net.ServerSocket _serverSocket
           
protected  java.util.Vector _subnodes
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SubnodeListener()
           
 
Method Summary
 java.util.Vector getSubnodes()
          Return vector of subnode IP addresses.
 void removeSubnode(java.net.InetAddress address)
          Remove specified subnode
 void run()
          Listen for contacts by subnode; if subnode is not yet in subnodes list, add it.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_serverSocket

protected java.net.ServerSocket _serverSocket

_subnodes

protected java.util.Vector _subnodes
Constructor Detail

SubnodeListener

public SubnodeListener()
                throws java.io.IOException
Throws:
java.io.IOException
Method Detail

run

public void run()
Listen for contacts by subnode; if subnode is not yet in subnodes list, add it.

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

getSubnodes

public java.util.Vector getSubnodes()
Return vector of subnode IP addresses.


removeSubnode

public void removeSubnode(java.net.InetAddress address)
                   throws java.lang.Exception
Remove specified subnode

Throws:
java.lang.Exception


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.