|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
common.AbstractThread
server.ServerThread
public class ServerThread
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static int |
IDLE
ServerThread is in the idle list. |
| Fields inherited from class common.AbstractThread |
|---|
player |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
ServerThread(java.net.Socket s,
int i)
Initializes the server thread by setting up all Object I/O to be used to communicate back and forth with a client. |
|
| Method Summary | |
|---|---|
void |
disconnect()
In the event of a disconnected player, takes appropriate action. |
int |
getPlayerNum()
Returns the player's number at the table. |
void |
passData(NetworkObject n)
Sends an incoming NetworkObject from the ServerThread to the Server. |
void |
setPlayerNum(int p)
Set's the player's number at the table. |
| Methods inherited from class common.AbstractThread |
|---|
destroyThread, getID, getPlayerName, isConnected, run, send, setID, setPlayerName |
| 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 |
|---|
public static final int IDLE
| Constructor Detail |
|---|
public ServerThread(java.net.Socket s,
int i)
s - socket that is connected to a clienti - the player number of the client that will be communicated with by this thread| Method Detail |
|---|
public void setPlayerNum(int p)
p - intpublic int getPlayerNum()
public void disconnect()
disconnect in class AbstractThreadpublic void passData(NetworkObject n)
passData in class AbstractThreadn - NetworkObject that needs to be passed to the appropriate method in the Server.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||