netcom.mds
Class HandleSocketConnects

java.lang.Object
  extended byjava.lang.Thread
      extended bynetcom.mds.HandleSocketConnects
All Implemented Interfaces:
java.lang.Runnable

public class HandleSocketConnects
extends java.lang.Thread

Title: Handle Socket Connections

Description: This class simply listens to a server port and accepts incoming connections to the MDS node. It then adds the Socket of the incoming connection to a supplied Collection.

Copyright: Copyright (c) 2002

Company: NETCOM


Field Summary
 java.util.Collection socket_collection_ptr
          Reference/pointer to connections_sockets Map in MDS
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
HandleSocketConnects(int server_port, java.util.Collection socket_collection)
          Constructor, This is created with a port number and a Collection to add new connections to.
 
Method Summary
 void run()
          This Method is where this thread begins execution This thread just loops, waiting for a new socket connection, and adds it to the given Collection of Sockets
 
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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

socket_collection_ptr

public java.util.Collection socket_collection_ptr
Reference/pointer to connections_sockets Map in MDS

Constructor Detail

HandleSocketConnects

public HandleSocketConnects(int server_port,
                            java.util.Collection socket_collection)
Constructor, This is created with a port number and a Collection to add new connections to. Assume the collection is synchronized and needs to be thread-safe

Parameters:
server_port - the port to bind to
socket_collection - the collection to add Sockets to
Method Detail

run

public void run()
This Method is where this thread begins execution This thread just loops, waiting for a new socket connection, and adds it to the given Collection of Sockets