|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The ClientProtocolHandler handles the protocols communication to the client
Method Summary | |
void |
arena(short[][] pMapBytes,
short[][] pBitmapBytes,
Command[] pMapCommands,
Stat[] pPlayerStats)
gives the server the arena and player information, used when entering an arena |
void |
changedStat(int pStatID,
int pStatValue)
sets stat pStatID to pStatValue (int) |
void |
changedStat(int pStatID,
java.lang.String pStatValue)
sets stat pStatID to pStatValue (string) |
void |
command(Command pCommand)
adds or removes a command |
void |
connectionError(java.lang.String pMessage)
the connectionError method is called when an error occurs while connecting |
void |
giveSenders(UdpSender pUdpSender,
TcpSender pTcpSender)
gives the protocol handler the senders |
void |
newLocation(int pXMap,
int pYMap)
sets the location of the player in this arena |
void |
newMessage(java.lang.String pMessage)
adds new message |
void |
newObject(int pBitmapID,
int pXDelta,
int pYDelta)
adds new map object |
void |
refresh()
refresh tells the client that all the info for turn has arrived |
void |
serverExit()
informs that the server has exited/killed our connect |
void |
serverReconnect()
informs that the server wishes a reconnect (new connect via tcp and udp) purpose: arena change |
Method Detail |
public void giveSenders(UdpSender pUdpSender, TcpSender pTcpSender)
pUdpSender
- the udpsender for the clientpTcpSender
- the tcpsender for the clientpublic void arena(short[][] pMapBytes, short[][] pBitmapBytes, Command[] pMapCommands, Stat[] pPlayerStats)
pMapBytes
- gives the client the new mappBitmapBytes
- gives the client the new bitmapspMapCommands
- gives the client the new commands for this mappPlayerStats
- gives the client the stats of the playerpublic void serverExit()
public void serverReconnect()
public void refresh()
public void newLocation(int pXMap, int pYMap)
pXMap
- the x coordinate on the mappYMap
- the y coordinate on the mappublic void changedStat(int pStatID, int pStatValue)
pStatID
- the id of the stat to be setpStatValue
- the value that the stat should takepublic void changedStat(int pStatID, java.lang.String pStatValue)
pStatID
- the id of the stat to be setpStatValue
- the value of the stat to be setpublic void command(Command pCommand)
pCommand
- the commandpublic void newMessage(java.lang.String pMessage)
pMessage
- the messagepublic void newObject(int pBitmapID, int pXDelta, int pYDelta)
pBitmapID
- the id of the bitmap to be displayedpXDelta
- the x distance from the playerpYDelta
- the y distance from the playerpublic void connectionError(java.lang.String pMessage)
pMessage
- the message of the error
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |