|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
vooga.engine.networking.server.VoogaDaemon
public class VoogaDaemon
Thread that is run on the server 24/7 for each game using the networking API. It creates the sockets that the game will be communicating over and initiates the ChatHandler and ClientHandler subclass for every connection.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
int |
numberOfGames
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
VoogaDaemon(int gamePortNumber,
int chatPortNumber,
int numberOfPlayers,
java.lang.String clientHandler)
Static method to return the XML document with the list of games that can be run on the networking Vooga servers. |
Method Summary | |
---|---|
protected void |
finalize()
Close the game and chat ports. |
void |
run()
Whenever a new client connects to the chat or game ports, create instances of the ChatHandler and ClientHandler subclass respectively and start them. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, 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 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int numberOfGames
Constructor Detail |
---|
public VoogaDaemon(int gamePortNumber, int chatPortNumber, int numberOfPlayers, java.lang.String clientHandler)
gamePortNumber
- the port through which to send messages related to the gamechatPortNumber
- the port through which to send chatsnumberOfPlayers
- the number of players necessary for the gameclientHandler
- the name of the subclass of ClientHandlerMethod Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected void finalize()
finalize
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |