netcom.proxy
Class MDSProxy

java.lang.Object
  extended byjava.lang.Thread
      extended bynetcom.proxy.MDSProxy
All Implemented Interfaces:
LoggerInterface, java.lang.Runnable

public class MDSProxy
extends java.lang.Thread
implements LoggerInterface

Title: MDS Proxy

Description: This is the main MDS proxy class which holds 'core' data structures and hold all threads checking up on ports and processing data

Copyright: Copyright (c) 2002

Company:


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MDSProxy()
          Constructor
 
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()
          gets what the port of the mds or proxy node is.
static void main(java.lang.String[] args)
          Main method, starts program
 void run()
           
 
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

MDSProxy

public MDSProxy()
Constructor

Method Detail

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

getThePort

public int getThePort()
Description copied from interface: LoggerInterface
gets what the port of the mds or proxy node is.

Specified by:
getThePort in interface LoggerInterface
Returns:
port number MDSProxy is listening on for PServers/PClients

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

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:
null MDSProxy has no Friends.

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

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()
Specified by:
run in interface java.lang.Runnable

main

public static void main(java.lang.String[] args)
Main method, starts program