All Packages Class Hierarchy This Package Previous Next Index
Class game.ClientHandler
java.lang.Object
|
+----java.lang.Thread
|
+----game.Handler
|
+----game.ClientHandler
- public class ClientHandler
- extends Handler
The ClientHandler
class handles the client connection
in the server. This class is intended to be used in the jags
server.
[DESCRIBE ME MORE]
-
server
- The server that created this ClientHandler.
-
ClientHandler(GameServer, Socket)
- Creates a new ClientHandler.
-
doJoinGame(LinkFrame)
- Handles RQ_JOIN_GAME request.
-
doLeaveGame(LinkFrame)
-
Handles the RQ_LEAVE_GAME request.
-
doServerId(LinkFrame)
-
Handles the RQ_SERVERID request.
-
frameReceived(Object, LinkFrame)
- Messaged when a new data frame is received by the
GameLink
object and this frame belongs to the groups the GameLinkListener
asked to listen to.
-
run()
- run! run! [DESCRIBE ME]
server
GameServer server
- The server that created this ClientHandler.
ClientHandler
public ClientHandler(GameServer server,
Socket socket) throws SocketException
- Creates a new ClientHandler.
- Parameters:
- server - the server wishing to handle the client.
- socket - the socket which the client is connected to.
run
public void run()
- run! run! [DESCRIBE ME]
- Overrides:
- run in class Thread
frameReceived
public void frameReceived(Object link,
LinkFrame frame)
- Messaged when a new data frame is received by the
GameLink
object and this frame belongs to the groups the GameLinkListener
asked to listen to.
- Parameters:
- frame - the frame that has just been received.
- Overrides:
- frameReceived in class Handler
- See Also:
- GameLinkListener
doServerId
void doServerId(LinkFrame frame)
- Handles the RQ_SERVERID request.
- Parameters:
- frame - the frame containing the RQ_SERVERID request.
doJoinGame
void doJoinGame(LinkFrame frame)
- Handles RQ_JOIN_GAME request.
- Parameters:
- frame - the frame containing the RQ_JOIN_GAME request.
doLeaveGame
void doLeaveGame(LinkFrame frame)
- Handles the RQ_LEAVE_GAME request.
- Parameters:
- frame - the frame containing the RQ_LEAVE_GAME request.
All Packages Class Hierarchy This Package Previous Next Index