|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The application instance is the actual game played. It is the running instance of the Application object. For a game to be created there must be a new application instance created to manage the actual game and the players in it. In this way, multiple instances of an Application (game) can be run simultaneously, each controlling a different game and its players. A specific Tic-Tac-Toe board is an example of an Application Instance. Every Application Instance contains ApplicatioInstanceID needed to access the persistent state. Application instance is target for Application events and implements listeners for those events. An ActorSession is the actual representation of a user Session in a game. Application Instance - ActorSession Relations: ? An application instance can manage several actors simultaneously – optional for version 1.0 of MGIF standard platform. ? A user can be represented simultaneously in several application instances (games). A user can simultaneously play in all those game boards (optional for version 1.0 of MGIF standard platform) Note: The decision on whether a user can play simultaneously in several instances of the same game is a commercial production decision of the operator, and the application cannot make any assumptions to that effect.
Method Summary | |
long |
createNewAppInstance(java.lang.String applicationName,
java.util.Map params)
Creates new application instance of a given type |
long |
createTimer(java.util.Date expirationTime,
java.util.Map params)
Creates a new timer for this ApplicationInstance. |
void |
end()
Finishes the lifecycle of applicateion instance. |
java.util.Iterator |
enumerateActorSession()
Enumerates all actor session associated with this application instance |
ActorSession |
getActorSession(long actorSesionID)
Gets the ActorSession asociated with this sesion and provided ID. |
Application |
getApplication()
Returns the Application object related to this ApplicationInstance |
long |
getApplicationInstanceId()
Returns the system ID of this ApplicationInstance object |
Logger |
getLogger()
Logger a logger used to log messages to the application log. |
MessageFactory |
getMessageFactory(java.lang.String msisdn)
Return mesage factory to generate push messages. |
ScoreTableManager |
getScoreTableManager()
Returns the ScoreTableManager |
void |
sendInterAppMessage(long targetApplicationInstance,
java.util.Map params)
Sends message to some existing ApplicationInstance object in the system. |
Method Detail |
public long createNewAppInstance(java.lang.String applicationName, java.util.Map params)
applicationName
- Name of desired application. The name should be unique and provided
by installation of Application.params
- Set of params that will be transferred to newly created
ApplicatioInstance object as part of org.mgif.event.CreateEvent
object.public long createTimer(java.util.Date expirationTime, java.util.Map params)
The method onApplicationInstanceTimer on the OnApplicationInstanceTimer interface is called when the timer expires.
expirationTime
- the time when this timer is set to expireparams
- Timer parameterspublic void end()
public java.util.Iterator enumerateActorSession()
public ActorSession getActorSession(long actorSesionID)
actorSesionID
- The system ID of desired ActorSession object.public Application getApplication()
public long getApplicationInstanceId()
public Logger getLogger()
public MessageFactory getMessageFactory(java.lang.String msisdn)
public ScoreTableManager getScoreTableManager()
public void sendInterAppMessage(long targetApplicationInstance, java.util.Map params)
targetApplicationInstance
- The system ID of targetparams
- Set of object transferred to target ApplicationInstance object
as part of org.mgif.event.InterAppMessageEvent
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |