public class GameChangeManager extends Object implements com.sun.sgs.app.Task, com.sun.sgs.app.ManagedObject, Serializable
GameChangeManager for each game app.| Modifier and Type | Field and Description |
|---|---|
static int |
CHANGE_MANAGER_FREQUENCY
The default number of milliseconds between update calls.
|
static String |
IDENTIFIER
The identifier for the single manager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addGameChangeListener(GameChangeListener listener)
Adds a listener to this manager.
|
static GameChangeManager |
getInstance()
Provides access to the single instance of
GameChangeManager. |
void |
notifyGameAdded(String game)
Notifies the manager that a game was added to the app.
|
void |
notifyGameRemoved(String game)
Notifies the manager that a game was removed from the app.
|
void |
notifyMembershipChanged(GameMembershipDetail detail)
Notifies the manager that membership detail has changed in a specific
game.
|
void |
run()
Called at periodic intervals by the system, this method notifies
all registered listeners if there have been any updates since the
last notification.
|
public static final String IDENTIFIER
public static final int CHANGE_MANAGER_FREQUENCY
public static GameChangeManager getInstance()
GameChangeManager. If a manager hasn't already
been created, then a new instance is created and added as a
registered ManagedObject. If the manager already
exists then nothing new is created.
See the comment in Lobby.getInstance for more about the
pattern used by these getInstance methods.
GameChangeManagerpublic void addGameChangeListener(GameChangeListener listener)
listener - the listener to addpublic void notifyGameAdded(String game)
game - the name of the Gamepublic void notifyGameRemoved(String game)
game - the name of the Gamepublic void notifyMembershipChanged(GameMembershipDetail detail)
detail - the update informationCopyright © 2013. All Rights Reserved.