|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
Network.WaitConnection
public class WaitConnection
Class WaitConnection
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
private GameField |
gameField
|
static int |
MAX_CLIENT
|
private int |
nbClient
|
private int |
nbClientConnected
|
private Network |
network
|
private java.net.ServerSocket |
socket
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
WaitConnection(GameField gameField,
Network network,
int port,
int nbClient)
|
|
| Method Summary | |
|---|---|
Network |
getNetwork()
Get the value of network |
java.net.ServerSocket |
getSocket()
Get the value of socket |
void |
lostConnexion()
Décrémente le nb de client connecté relance l'attente si besoin |
void |
run()
Attend les connections des clients et les ajoutent dans Network.connections |
void |
setNetwork(Network value)
Set the value of network |
void |
setSocket(java.net.ServerSocket value)
Set the value of socket |
void |
stopWait()
Stoppe l'écoute |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private GameField gameField
public static final int MAX_CLIENT
private int nbClient
private int nbClientConnected
private Network network
private java.net.ServerSocket socket
| Constructor Detail |
|---|
public WaitConnection(GameField gameField,
Network network,
int port,
int nbClient)
throws java.io.IOException,
NetworkException
java.io.IOException
NetworkException| Method Detail |
|---|
public Network getNetwork()
public java.net.ServerSocket getSocket()
public void lostConnexion()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void setNetwork(Network value)
public void setSocket(java.net.ServerSocket value)
public void stopWait()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||