|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gecco.communication.server.RoleConnection
A class that represents the connection from the server to a specific role. So this class keeps track of all the clients that have joined as that specific role
| Field Summary | |
private Vector |
clients
Description of the Field |
private String |
role_name
Description of the Field |
private Server |
server
Description of the Field |
| Constructor Summary | |
RoleConnection(String role,
Server server)
Constructor for the RoleConnection object |
|
| Method Summary | |
void |
add(ClientConnection c)
adds a new client to this role |
int |
getAvailableId()
returns the lowest nonnegative integer that is not used as an id by any client |
int |
getNumberOfClients()
returns the number of clients connected to this role |
void |
remove(ClientConnectionHandler c)
removes a client from this role |
void |
sendMessage(ServerMessage m)
called by ClientAmbassodor to send a message to this role This method then distributes this message to all clients connected as this role |
String |
whoIsConnected()
returns a string with the names of the clients connected to this role. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private Vector clients
private String role_name
private Server server
| Constructor Detail |
public RoleConnection(String role,
Server server)
role - Description of Parameterserver - Description of Parameter| Method Detail |
public int getNumberOfClients()
public int getAvailableId()
public void add(ClientConnection c)
c - Description of Parameterpublic void remove(ClientConnectionHandler c)
c - Description of Parameterpublic String whoIsConnected()
public void sendMessage(ServerMessage m)
m - Description of Parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||