netcom.mds
Class MDS

java.lang.Object
  extended byjava.lang.Thread
      extended bynetcom.mds.MDS
All Implemented Interfaces:
LoggerInterface, java.lang.Runnable

public class MDS
extends java.lang.Thread
implements LoggerInterface

Title: MDS

Description: This is the central MDS node which holds all of the 'core' data structures which other threads modify. It also checks all sockets for incoming request and sends them off to be processed

Copyright: Copyright (c) 2002

Company: NETCOM


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MDS()
          Constructor for an MDS Node.
 
Method Summary
 void finalize()
          This is the finalize method, and should be called whenever this object is disappearing This unallocates all references it must and informs the network that this node is no good anymore
 java.util.Collection getFriends()
          This is a method used by the Logging Gui to figure out who this MDSNode's friends are
 java.lang.String getIP()
          This is a method used by the Logging Gui to figure out what IP this Node sits on
 java.lang.String getNodeName()
          This is a method used by the Logging Gui to figure out the "name" of this MDSNode
 int getNodeType()
          This is a method used by the Logging Gui to see what type of node I am (MDSProxy or MDSNode)
 int getNumConnections()
          This is a method used by the Logging Gui to know the number of connections
 int getThePort()
          This is a method used by the Logging Gui to tell what port the MDS is listening for MDSProxies ON
 void run()
          run() overrides run from Thread; execution starts here.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MDS

public MDS()
Constructor for an MDS Node. Creates all necessary internal structures to be used when the class is finall 'run()'

Method Detail

getThePort

public int getThePort()
This is a method used by the Logging Gui to tell what port the MDS is listening for MDSProxies ON

Specified by:
getThePort in interface LoggerInterface
Returns:
the port the MDS is listening to for MDSPRoxy connections

getNodeType

public int getNodeType()
This is a method used by the Logging Gui to see what type of node I am (MDSProxy or MDSNode)

Specified by:
getNodeType in interface LoggerInterface
Returns:
int constant for the type

getIP

public java.lang.String getIP()
This is a method used by the Logging Gui to figure out what IP this Node sits on

Specified by:
getIP in interface LoggerInterface
Returns:
a String of the IP address

getFriends

public java.util.Collection getFriends()
This is a method used by the Logging Gui to figure out who this MDSNode's friends are

Specified by:
getFriends in interface LoggerInterface
Returns:
A collections of all of this nodes friends as InetSocketAddress objects

getNodeName

public java.lang.String getNodeName()
This is a method used by the Logging Gui to figure out the "name" of this MDSNode

Specified by:
getNodeName in interface LoggerInterface
Returns:
a String "name" of this MDSNode

getNumConnections

public int getNumConnections()
This is a method used by the Logging Gui to know the number of connections

Specified by:
getNumConnections in interface LoggerInterface
Returns:
an int of the total current number of PServers and PClients connected

finalize

public void finalize()
This is the finalize method, and should be called whenever this object is disappearing This unallocates all references it must and informs the network that this node is no good anymore


run

public void run()
run() overrides run from Thread; execution starts here. This basically creates all necessary server sockets, and starts the looping routine

Specified by:
run in interface java.lang.Runnable