public interface PlayerSession extends Session
Player
, the GameRoom
to which
this session will connect and the network Protocol
that will be used
for communication.Session.Status
Modifier and Type | Method and Description |
---|---|
GameRoom |
getGameRoom()
Each user session is attached to a game room.
|
Player |
getPlayer()
Each session is associated with a
Player . |
Protocol |
getProtocol()
Get the
Protocol associated with this session. |
void |
sendToGameRoom(Event event)
The event to be send to the
GameRoom to which the PlayerSession
belongs. |
void |
setGameRoom(GameRoom gameRoom)
Method used to set the game room for a particular session.
|
void |
setProtocol(Protocol protocol)
Set the network protocol on the user session.
|
addHandler, close, getAttribute, getCreationTime, getEventDispatcher, getEventHandlers, getId, getLastReadWriteTime, getStatus, getTcpSender, getUdpSender, isConnected, isShuttingDown, isUDPEnabled, isWriteable, onEvent, removeAttribute, removeHandler, setAttribute, setId, setStatus, setTcpSender, setUDPEnabled, setUdpSender, setWriteable
Player getPlayer()
Player
. This is the actual
human or machine using this session.GameRoom getGameRoom()
void setGameRoom(GameRoom gameRoom)
gameRoom
- The gameRoom object to set.Protocol getProtocol()
Protocol
associated with this session.void setProtocol(Protocol protocol)
protocol
- The Protocol
to set.Copyright © 2013. All Rights Reserved.