gecco.communication.server
Class ClientConnectionHandler
java.lang.Object
|
+--gecco.communication.server.ClientConnectionHandler
- public class ClientConnectionHandler
- extends Object
A class that keep track of all the parts needed for a connection to a client
- Author:
- Niklas Hallenfur
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClientConnectionHandler
public ClientConnectionHandler(ClientConnection connection,
Server server,
RoleConnection roleconnection)
- Constructor for the ClientConnectionHandler object
- Parameters:
connection
- Description of Parameterserver
- Description of Parameterroleconnection
- Description of Parameter
getClientConnection
public ClientConnection getClientConnection()
- Gets the ClientConnection attribute of the ClientConnectionHandler
object
- Returns:
- The ClientConnection value
startThreads
public void startThreads()
- Description of the Method
sendMessage
public void sendMessage(Message m)
- called by RoleConnection, to send a message to the client represented by
this ClientConnectionHandler
- Parameters:
m
- Description of Parameter
connectionLost
public void connectionLost(String role,
int id)
- Description of the Method
- Parameters:
role
- Description of Parameterid
- Description of Parameter