gecco.communication.server
Class ClientConnection

java.lang.Object
  |
  +--gecco.communication.server.ClientConnection

public class ClientConnection
extends Object

A class that keeps track of the 'physical' connection to a client

Author:
Niklas Hallenfur

Constructor Summary
ClientConnection(Socket sock, String r, int n1)
           
 
Method Summary
 DataInputStream getDataInputStream()
          Gets the DataInputStream attribute of the ClientConnection object
 DataOutputStream getDataOutputStream()
          Gets the DataOutputStream attribute of the ClientConnection object
 int getId()
          Gets the Id attribute of the ClientConnection object
 String getRole()
          Gets the Role attribute of the ClientConnection object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientConnection

public ClientConnection(Socket sock,
                        String r,
                        int n1)
                 throws IOException
Parameters:
sock - The client's socket
r - The client's role
n1 - the client's unique id
Throws:
IOException - Description of Exception
Method Detail

getId

public int getId()
Gets the Id attribute of the ClientConnection object
Returns:
The Id value

getRole

public String getRole()
Gets the Role attribute of the ClientConnection object
Returns:
The Role value

getDataOutputStream

public DataOutputStream getDataOutputStream()
Gets the DataOutputStream attribute of the ClientConnection object
Returns:
The DataOutputStream value

getDataInputStream

public DataInputStream getDataInputStream()
Gets the DataInputStream attribute of the ClientConnection object
Returns:
The DataInputStream value