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]


Variable Index

 o server
The server that created this ClientHandler.

Constructor Index

 o ClientHandler(GameServer, Socket)
Creates a new ClientHandler.

Method Index

 o doJoinGame(LinkFrame)
Handles RQ_JOIN_GAME request.
 o doLeaveGame(LinkFrame)
Handles the RQ_LEAVE_GAME request.
 o doServerId(LinkFrame)
Handles the RQ_SERVERID request.
 o 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.
 o run()
run! run! [DESCRIBE ME]

Variables

 o server
 GameServer server
The server that created this ClientHandler.

Constructors

 o 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.

Methods

 o run
 public void run()
run! run! [DESCRIBE ME]

Overrides:
run in class Thread
 o 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
 o doServerId
 void doServerId(LinkFrame frame)
Handles the RQ_SERVERID request.

Parameters:
frame - the frame containing the RQ_SERVERID request.
 o doJoinGame
 void doJoinGame(LinkFrame frame)
Handles RQ_JOIN_GAME request.

Parameters:
frame - the frame containing the RQ_JOIN_GAME request.
 o 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