public abstract class GameChannelListener extends Object implements com.sun.sgs.client.ClientChannelListener
| Modifier | Constructor and Description |
|---|---|
protected |
GameChannelListener(ChatListener chatListener)
Creates an instance of
GameChannelListener. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPlayerIdMapping(BigInteger playerID,
String playerName)
Notifies this listener of new user identifier mappings.
|
protected static Object |
getObject(ByteBuffer data)
Retrieves a serialized object from the given buffer.
|
void |
leftChannel(com.sun.sgs.client.ClientChannel channel) |
protected void |
notifyChatMessage(ByteBuffer data)
Notifies this listener that a chat message arrived from the
given player.
|
protected void |
notifyJoin(ByteBuffer data)
Notifies the game that a player has joined.
|
protected void |
notifyLeave(ByteBuffer data)
Notifies the game that a player has left.
|
protected GameChannelListener(ChatListener chatListener)
GameChannelListener.public void leftChannel(com.sun.sgs.client.ClientChannel channel)
leftChannel in interface com.sun.sgs.client.ClientChannelListenerprotected void notifyJoin(ByteBuffer data)
protected void notifyLeave(ByteBuffer data)
protected void notifyChatMessage(ByteBuffer data)
data - the chat messageprotected void addPlayerIdMapping(BigInteger playerID, String playerName) throws IOException
data - encoded mapping from user identifier to stringIOExceptionprotected static Object getObject(ByteBuffer data) throws IOException
data - the encoded object to retrieveIOExceptionCopyright © 2013. All Rights Reserved.