|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.epfl.lpd.ids.CentralizedChat
public class CentralizedChat
CentralizedChat class used to start the local chat. This class starts the server and the different chat clients.
Field Summary | |
---|---|
protected ChatClient[] |
clients
The different chat clients. |
protected int |
numberOfActiveClients
The total number of active clients. |
protected int |
numberOfClients
The total number of clients to start. |
Constructor Summary | |
---|---|
CentralizedChat(int numberOfClients)
Creates a new instance of CentralizedChat. |
Method Summary | |
---|---|
void |
closeClient()
Method called by a chat client when its window is closed. |
static void |
main(String[] args)
The main method of the class. |
static void |
printUsage()
Utility method used to print a help usage menu. |
void |
start()
Creates the chat server object and the different chat clients. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ChatClient[] clients
protected int numberOfClients
protected int numberOfActiveClients
Constructor Detail |
---|
public CentralizedChat(int numberOfClients)
numberOfClients
- The total number of clients to createMethod Detail |
---|
public void start()
public void closeClient()
closeClient
in interface IWindowManager
public static void printUsage()
public static void main(String[] args)
args
- The arguments given when launching the
application. The first and only argument specifies the number
of clients to start.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |