Ver. 20060815

Server
Class ClientContainer

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

public class ClientContainer
extends ConnectionContainer

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


Field Summary
private  simsa.xml.XMLParser ixp
           
private  ModuleContainer moduleCtnr
           
private  simsa.xml.XMLParser oxp
           
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
ClientContainer(java.nio.channels.SelectionKey key)
          Creates a client container for an incoming connection.
 
Method Summary
 ModuleContainer connectedModule()
          Returns a reference to the module that this client is associated with; null if this client isn't connected to a module.
 void connectToModule(ModuleContainer mc)
          Associates a module with this client for routing messages.
 void disconnectFromModule()
          Removes this client from the registry of its associated modules.
 void handleInput()
          Implements the message handling section of a client.
 void selfDestruct()
          This function attempts to cleanly bring down a client, 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

moduleCtnr

private ModuleContainer moduleCtnr

oxp

private simsa.xml.XMLParser oxp

ixp

private simsa.xml.XMLParser ixp

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

ClientContainer

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

Method Detail

connectToModule

public void connectToModule(ModuleContainer mc)
Associates a module with this client for routing messages. 2006/08/10 Kyle Reed


disconnectFromModule

public void disconnectFromModule()
Removes this client from the registry of its associated modules. 2006/08/10 Kyle Reed


handleInput

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

Specified by:
handleInput in class ConnectionContainer

selfDestruct

public void selfDestruct()
This function attempts to cleanly bring down a client, 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

connectedModule

public ModuleContainer connectedModule()
Returns a reference to the module that this client is associated with; null if this client isn't connected to a module. 2006/08/10 Kyle Reed


Ver. 20060815