public final class Messages extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
broadcastBoardUpdate(com.sun.sgs.app.Channel channel,
Collection<BoardSpace> spaces)
Sends updates about a
Collection of spaces. |
static void |
broadcastGameAdded(com.sun.sgs.app.Channel channel,
String name)
Sends notice to a set of clients that a game has been added.
|
static void |
broadcastGameCountChanged(com.sun.sgs.app.Channel channel,
int count,
String name)
Sends notice to a set of clients that the membership of a given
game has changed.
|
static void |
broadcastGameRemoved(com.sun.sgs.app.Channel channel,
String name)
Sends notice to a set of clients that a game has been removed.
|
static void |
broadcastPlayerID(com.sun.sgs.app.Channel channel,
String playerName,
BigInteger playerID)
Sends the command to add the mapping from player ID to player
name to all the clients on the provided channel.
|
static void |
broadcastPlayerJoined(com.sun.sgs.app.Channel channel,
BigInteger playerID)
Notifies all the sessons on the channel that the provided
ClientSession has joined. |
static void |
broadcastPlayerLeft(com.sun.sgs.app.Channel channel,
BigInteger playerID)
Notifies all the sessons on the channel that the provided
ClientSession has left. |
static void |
sendBoard(com.sun.sgs.app.ClientSession session,
Board board)
Sends a complete
Board to a client. |
static void |
sendBulkPlayerIDs(com.sun.sgs.app.ClientSession session,
Map<com.sun.sgs.app.ManagedReference<com.sun.sgs.app.ClientSession>,String> playerToName)
Sends the command to add the all of the provided mappings from
player ID to player name to the specified client.
|
static void |
sendCharacter(com.sun.sgs.app.ClientSession session,
int id,
CharacterStats stats)
Sends detail about a single character.
|
static void |
sendGameListing(com.sun.sgs.app.ClientSession session,
Collection<GameMembershipDetail> games)
Sends the initial welcome message when a client enters the
lobby.
|
static void |
sendNotificationOfUnhandledCommand(com.sun.sgs.app.ClientSession session,
String channelName,
Commands.Command command) |
static void |
sendPlayableCharacters(com.sun.sgs.app.ClientSession session,
Collection<CharacterStats> stats)
Sends a
Collection of player statistics. |
static void |
sendServerMessage(com.sun.sgs.app.ClientSession session,
String message)
Sends a text message to the client.
|
static void |
sendSpriteMap(com.sun.sgs.app.ClientSession session,
SpriteMap spriteMap)
Sends a new mapping from identifiers to sprite images.
|
public static void sendNotificationOfUnhandledCommand(com.sun.sgs.app.ClientSession session,
String channelName,
Commands.Command command)
public static void broadcastPlayerJoined(com.sun.sgs.app.Channel channel,
BigInteger playerID)
ClientSession has joined.public static void broadcastPlayerLeft(com.sun.sgs.app.Channel channel,
BigInteger playerID)
ClientSession has left.public static void broadcastPlayerID(com.sun.sgs.app.Channel channel,
String playerName,
BigInteger playerID)
public static void sendBulkPlayerIDs(com.sun.sgs.app.ClientSession session,
Map<com.sun.sgs.app.ManagedReference<com.sun.sgs.app.ClientSession>,String> playerToName)
public static void sendGameListing(com.sun.sgs.app.ClientSession session,
Collection<GameMembershipDetail> games)
games - the Collection of games and their detailpublic static void broadcastGameCountChanged(com.sun.sgs.app.Channel channel,
int count,
String name)
name - the name of the game that changedcount - the updated membership countpublic static void broadcastGameAdded(com.sun.sgs.app.Channel channel,
String name)
name - the name of the game that was addedpublic static void broadcastGameRemoved(com.sun.sgs.app.Channel channel,
String name)
name - the name of the game that was addedpublic static void sendPlayableCharacters(com.sun.sgs.app.ClientSession session,
Collection<CharacterStats> stats)
Collection of player statistics.stats - the collection of character statisticspublic static void sendSpriteMap(com.sun.sgs.app.ClientSession session,
SpriteMap spriteMap)
spriteMap - the mapping from identifier to spritepublic static void sendBoard(com.sun.sgs.app.ClientSession session,
Board board)
Board to a client.board - the Board to sendpublic static void broadcastBoardUpdate(com.sun.sgs.app.Channel channel,
Collection<BoardSpace> spaces)
Collection of spaces.spaces - the spaces that are being updatedpublic static void sendServerMessage(com.sun.sgs.app.ClientSession session,
String message)
message - the message to sendpublic static void sendCharacter(com.sun.sgs.app.ClientSession session,
int id,
CharacterStats stats)
id - the character's idstats - the character's statisticsCopyright © 2013. All Rights Reserved.