|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An ActorSession object represents a specific user in the context of a particular application instance (game). Each user can be present in multiple applications at the same time, and thus be associated with several ActorSession objects. There is a one-to-many relationship between the user and ActorSession. An ActorSession is created by the Platform and joined to the appropriate Application Instance. ActorSession interface contains ActorSessionID which pared with ApplicationInstanceID and ApplicationID is used to access actor session persistent state. The corresponding ActorSession object in the game handles inputs received from a specific user. Output to the user is sent through the ActorSession object. 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 | |
MeteringEvent |
createMeteringEvent(int meteringEventTypeId)
Creates metering event |
long |
createTimer(java.util.Date expirationTime,
java.util.Map params)
Creates a new timer for this ActorSession. |
void |
delete()
Deletes the ActorSession. |
Actor |
getActor()
Returns Actor object related to this ActorSession. |
ApplicationInstance |
getApplicationInstance()
Returns the ApplicationInstance related to this ActorSession object. |
Logger |
getLogger()
Logger a logger used to log messages to the application log. |
MessageFactory |
getMessageFactory()
Return mesage factory to generate push messages for user associated with this ActorSession object. |
java.lang.String |
getNickName()
Returns the nickname of the actor session |
ScoreManager |
getScoreManager()
Creates and returns the ScoreManager |
void |
joinToApplicationInstance(long targetApplicationInstance,
java.util.Map params)
Joins the ActorSession related user to some other application instance by sending him joinEvent. |
Method Detail |
public MeteringEvent createMeteringEvent(int meteringEventTypeId)
meteringEventTypeId
- The system tye ID of desired metring eventpublic long createTimer(java.util.Date expirationTime, java.util.Map params)
expirationTime
- the time when this timer is set to expireparams
- Timer parameters transferred to handled ActorSessionTimerEventpublic void delete()
public Actor getActor()
public ApplicationInstance getApplicationInstance()
public Logger getLogger()
public MessageFactory getMessageFactory()
public java.lang.String getNickName()
public ScoreManager getScoreManager()
public void joinToApplicationInstance(long targetApplicationInstance, java.util.Map params)
targetApplicationInstance
- System ID of ApplicationInstance object to which new ActorSession will
be connected. This ID should be valid at time of execution of join operation.params
- Set of parameters transferred to target application instance and viewed
as part of JoinEvent object when join event is handled.
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |