Class ModelServerWorker
java.lang.Object
|
+----java.lang.Thread
|
+----ModelServerWorker
- public class ModelServerWorker
- extends Thread
Network ModelUpdate server for managing an individual
client connection.
- Version:
- $Revision: 1.9 $, $Date: 2000/10/12 14:09:49 $
- Author:
- Mike Spengler, Joseph Thomas
-
msv
- Pointer to the ModelServer which owns us
-
muQ
- The FIFO queue of ModelUpdates waiting to be processed
-
net
- Pointer to the ATMNetwork which represents this run
-
oos
- The output stream to which ModelUpdates will be written
-
qpause
- Number of milliseconds to pause between update queue runs
-
rcount
- The reference count for number of objects processed
-
sock
- The socket connection to the listener this worker is feeding
-
ModelServerWorker(ModelServer, Socket, ConfigMgr)
- Class constructor.
-
closeOut()
- Closes the client socket and removes self from worker list.
-
enqueueUpdate(ModelUpdate)
- Queues the specified
ModelUpdate to our internal
processing queue.
-
finalize()
- Ensures that the client socket gets closed.
-
queueSize()
- Gets the number of components currently on the processing queue.
-
run()
- Adds self to the worker list and then processes the entries on our
internal processing queue.
qpause
private static final int qpause
- Number of milliseconds to pause between update queue runs
muQ
private FIFO muQ
- The FIFO queue of ModelUpdates waiting to be processed
oos
private ObjectOutputStream oos
- The output stream to which ModelUpdates will be written
msv
private ModelServer msv
- Pointer to the ModelServer which owns us
sock
private Socket sock
- The socket connection to the listener this worker is feeding
net
private ATMNetwork net
- Pointer to the ATMNetwork which represents this run
rcount
private int rcount
- The reference count for number of objects processed
ModelServerWorker
public ModelServerWorker(ModelServer msv,
Socket sock,
ConfigMgr cm)
- Class constructor.
- Parameters:
- msv - our parent server thread
- sock - accepted client connection socket
- cm - the configuration manager containing all
configuration information for this run
run
public void run()
- Adds self to the worker list and then processes the entries on our
internal processing queue.
- Overrides:
- run in class Thread
enqueueUpdate
public void enqueueUpdate(ModelUpdate update)
- Queues the specified
ModelUpdate to our internal
processing queue.
- Parameters:
- update - the
ModelUpdate to be queued
queueSize
public int queueSize()
- Gets the number of components currently on the processing queue.
- Returns:
- the count of components on the processing queue
closeOut
private void closeOut()
- Closes the client socket and removes self from worker list.
finalize
protected void finalize()
- Ensures that the client socket gets closed.
- Overrides:
- finalize in class Object