netcom.proxy
Class HandleOutsideConnections

java.lang.Object
  extended byjava.lang.Thread
      extended bynetcom.proxy.HandleOutsideConnections
All Implemented Interfaces:
java.lang.Runnable

public class HandleOutsideConnections
extends java.lang.Thread

Title: Handle Outside Connections

Description: This class handles outside connections to the MDSProxy, such as those from PServers and PClients, and adds the socket to the supplied Collection of sockets to be polled for data

Copyright: Copyright (c) 2002

Company:


Field Summary
 java.util.Map incoming_names_ptr
           
 java.util.Map outgoing_sockets_ptr
          Reference/pointer to outgoing_ps_sockets List in MDSProxy
 java.util.Collection socket_collection_ptr
          Reference/pointer to incoming_out_sockets List in MDSProxy
 ThreadPool thread_pool_ptr
          Reference/pointer to outgoing_ps_sockets List in MDSProxy
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
HandleOutsideConnections(int server_port, java.util.Map outgoing_sockets, java.util.Collection incoming_sockets, ThreadPool thread_pool, java.util.Map incoming_names, LDAPCommunicator ldap_communicator, Logger log, java.util.Map return_streams)
          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
 void waitForConnection()
          Method to wait for connections and then process them
 
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 incoming_out_sockets List in MDSProxy


outgoing_sockets_ptr

public java.util.Map outgoing_sockets_ptr
Reference/pointer to outgoing_ps_sockets List in MDSProxy


thread_pool_ptr

public ThreadPool thread_pool_ptr
Reference/pointer to outgoing_ps_sockets List in MDSProxy


incoming_names_ptr

public java.util.Map incoming_names_ptr
Constructor Detail

HandleOutsideConnections

public HandleOutsideConnections(int server_port,
                                java.util.Map outgoing_sockets,
                                java.util.Collection incoming_sockets,
                                ThreadPool thread_pool,
                                java.util.Map incoming_names,
                                LDAPCommunicator ldap_communicator,
                                Logger log,
                                java.util.Map return_streams)
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. It will pass MDSProxy Data Structur

Parameters:
server_port - the port to bind to
outgoing_sockets - the map of PServer to MDS
incoming_sockets - the collection to add Sockets to
thread_pool - HandleXMLTasks are put in this threadpool
ldap_communicator - Handles communcation with the LDAP server
log - Logs events
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


waitForConnection

public void waitForConnection()
Method to wait for connections and then process them