public class NetPuzlClientHandler
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
private static java.util.List<NetPuzlClientProxy> |
clientList
Creates new collections synchronized list for clientList.
|
private java.util.Timer |
timer
Timer timer for iterating through clients for deleting and cleaning up
|
Constructor and Description |
---|
NetPuzlClientHandler()
Instantiates a new Net Puzl Client Handler, and a new timer
|
Modifier and Type | Method and Description |
---|---|
void |
add(NetPuzlClientProxy cp)
Adds a client to the client list
|
void |
clearAgents()
Clears the client List
|
int |
getAgentsConnected()
Gets the number of clients connected
|
static java.lang.String |
getClientList()
Gets the client list.
|
void |
removeAgent(NetPuzlClientProxy cp)
Removes the Agent from the list
|
void |
run()
Threaded method to check for clients and calls the kill method to remove
them
|
private java.util.Timer timer
private static java.util.List<NetPuzlClientProxy> clientList
public NetPuzlClientHandler()
public int getAgentsConnected()
public void removeAgent(NetPuzlClientProxy cp)
cp
- NetPuzlClientProxy to be removedpublic void add(NetPuzlClientProxy cp)
cp
- is the client proxy to be addedpublic static java.lang.String getClientList()
public void clearAgents()
public void run()
run
in interface java.lang.Runnable