|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
vooga.network.VoogaServer
vooga.network.ingame.VoogaGameServer
public class VoogaGameServer
VoogaGameSessionServer manages clients in a game session.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class vooga.network.VoogaServer |
---|
SERVER |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
VoogaGameServer()
|
Method Summary | |
---|---|
void |
addUserToSession(long channelID,
java.lang.String userName)
Adds client user to a game session. |
void |
initialize()
Allows subclasses to perform an additional initialization after the server has been constructed and started listening. |
protected void |
intializeConnection(java.lang.String clientName,
java.net.Socket clientSocket)
Allows server subclasses to implement additional initialization for a user connection, such as starting a server thread to receive input from that client. |
static void |
main(java.lang.String[] args)
|
void |
removeUserFromSession(long sessionID,
java.lang.String userName)
Removes client user from a game session. |
void |
sendToSession(long channelID,
java.lang.String sender,
java.lang.Object obj)
Sends update to a clients in a game session. |
Methods inherited from class vooga.network.VoogaServer |
---|
getAllConnectedUsers, getInStream, getMySocket, getOutStream, listeningToSocket, removeConnection, run |
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 |
Constructor Detail |
---|
public VoogaGameServer() throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void initialize()
VoogaServer
initialize
in class VoogaServer
public void addUserToSession(long channelID, java.lang.String userName)
channelID
- unique game session identifier.userName
- to be added to unique game session.public void removeUserFromSession(long sessionID, java.lang.String userName)
sessionID
- unique session identifieruserName
- to be removed to unique game session.public void sendToSession(long channelID, java.lang.String sender, java.lang.Object obj)
channelID
- unique session identifier.sender
- sender in the game session.object
- update to be sent.protected void intializeConnection(java.lang.String clientName, java.net.Socket clientSocket)
VoogaServer
intializeConnection
in class VoogaServer
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |