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

Field Summary
private  ClientConnection connection
          Description of the Field
private  DataInputExchangeHandler DEHInput
          Description of the Field
private  DataOutputExchangeHandler DEHOutput
          Description of the Field
private  Thread inputThread
          Description of the Field
private  Thread outputThread
          Description of the Field
private  RoleConnection roleconnection
          Description of the Field
 
Constructor Summary
ClientConnectionHandler(ClientConnection connection, Server server, RoleConnection roleconnection)
          Constructor for the ClientConnectionHandler object
 
Method Summary
 void connectionLost(String role, int id)
          Description of the Method
 ClientConnection getClientConnection()
          Gets the ClientConnection attribute of the ClientConnectionHandler object
 void sendMessage(ServerMessage m)
          called by RoleConnection, to send a message to the client represented by this ClientConnectionHandler
 void startThreads()
          Description of the Method
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

connection

private ClientConnection connection
Description of the Field

roleconnection

private RoleConnection roleconnection
Description of the Field

DEHOutput

private DataOutputExchangeHandler DEHOutput
Description of the Field

DEHInput

private DataInputExchangeHandler DEHInput
Description of the Field

outputThread

private Thread outputThread
Description of the Field

inputThread

private Thread inputThread
Description of the Field
Constructor Detail

ClientConnectionHandler

public ClientConnectionHandler(ClientConnection connection,
                               Server server,
                               RoleConnection roleconnection)
Constructor for the ClientConnectionHandler object
Parameters:
connection - Description of Parameter
server - Description of Parameter
roleconnection - Description of Parameter
Method Detail

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(ServerMessage 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 Parameter
id - Description of Parameter