org.jogre.server
Class ConnectionList
java.lang.Object
|
+--org.jogre.server.ConnectionList
- public class ConnectionList
- extends Object
List of Connection objects.
- Version:
- Alpha 0.1
- Author:
- Bob Marks
Constructor Summary |
ConnectionList()
Constructor which sets up a Hash to store the various Connection
objects in. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionList
public ConnectionList()
- Constructor which sets up a Hash to store the various Connection
objects in.
addConnection
public void addConnection(String username,
ServerConnectionThread connectionThread)
- Create a new Connection object using a ServerConnectionThread and add
to the connections HashMap using the username as the key.
- Parameters:
username
- Username of person.connectionThread
- ServerConnectionThread.
getServerConnectionThread
public ServerConnectionThread getServerConnectionThread(String username)
- Return a serverconnection thread for a specified user (which is a field
of the Connection object).
- Parameters:
username
- Username of user.- Returns:
-
getConnection
public Connection getConnection(String username)
- Return a Connection object of specified user.
- Parameters:
username
- - Returns:
-