Ver. 20060815

Server
Class ModuleContainer

java.lang.Object
  extended by Server.ConnectionContainer
      extended by Server.ModuleContainer

public class ModuleContainer
extends ConnectionContainer

Contains all of the state information for a SIMSA module as well as handles inbound messages according to module specifications with a module parser. 2006/08/10 Kyle Reed


Field Summary
private  simsa.xml.XMLParser ixp
           
private  java.lang.String myType
           
private  simsa.xml.XMLParser oxp
           
private  java.util.HashMap<java.lang.Integer,ClientContainer> registeredClients
           
private  java.util.ArrayList<java.lang.String> vi_c
           
private  java.util.ArrayList<java.lang.String> vi_n
           
private  java.util.ArrayList<java.lang.String> vo_c
           
private  java.util.ArrayList<java.lang.String> vo_n
           
 
Fields inherited from class Server.ConnectionContainer
ba, bb, challengeNum, connected, idName, idNum, io, myKey, server, startTime
 
Constructor Summary
ModuleContainer(java.nio.channels.SelectionKey key)
          Creates a module container for an incoming connection.
 
Method Summary
 int getNumberOfClients()
          Returns the number of clients registered with the module.
 java.lang.String getType()
          Returns the mtype of the module as was passed to in by the connect.
 void handleInput()
          Implements the message handling section of a module.
 void registerClient(ClientContainer cc)
          Adds a clientContainer reference to registration list.
 void removeClient(java.lang.Integer key)
          Removes a client from the module's registeredClients list.
 void selfDestruct()
          This function attempts to cleanly bring down a module and its clients, set the calling opject to null after this function has been called to ensure that the GC picks it up.
 
Methods inherited from class Server.ConnectionContainer
getChallengeNum, getIdNum, getName, getUptime, sendTerminator, setName, setServer, writeToSelf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

registeredClients

private java.util.HashMap<java.lang.Integer,ClientContainer> registeredClients

oxp

private simsa.xml.XMLParser oxp

ixp

private simsa.xml.XMLParser ixp

myType

private java.lang.String myType

vo_c

private java.util.ArrayList<java.lang.String> vo_c

vo_n

private java.util.ArrayList<java.lang.String> vo_n

vi_c

private java.util.ArrayList<java.lang.String> vi_c

vi_n

private java.util.ArrayList<java.lang.String> vi_n
Constructor Detail

ModuleContainer

public ModuleContainer(java.nio.channels.SelectionKey key)
Creates a module container for an incoming connection. See Connection Container documentation. 2006/08/10 Kyle Reed

Method Detail

registerClient

public void registerClient(ClientContainer cc)
Adds a clientContainer reference to registration list. 2006/08/10 Kyle Reed


removeClient

public void removeClient(java.lang.Integer key)
Removes a client from the module's registeredClients list. 2006/08/10 Kyle Reed


handleInput

public void handleInput()
Implements the message handling section of a module. This functions processes incoming data accoring to the SIMSA spec for modules. 2006/08/10 Kyle Reed

Specified by:
handleInput in class ConnectionContainer

selfDestruct

public void selfDestruct()
This function attempts to cleanly bring down a module and its clients, set the calling opject to null after this function has been called to ensure that the GC picks it up. 2006/08/10 Kyle Reed

Specified by:
selfDestruct in class ConnectionContainer

getType

public java.lang.String getType()
Returns the mtype of the module as was passed to in by the connect. 2006/08/10 Kyle Reed


getNumberOfClients

public int getNumberOfClients()
Returns the number of clients registered with the module. 2006/08/10 Kyle Reed


Ver. 20060815