|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ApplicationInstance represent a game session of a specific application. It contains a vector of ActorSession representing the actors want to play in. This classes manage the in game events.
Method Summary | |
int |
actorSessionSize()
Returns the current number of ActorSession objects, e.g the number of actors ready to play this game session. |
boolean |
addActorSession(ActorSession actorSession)
Add the actor to the actors vector. |
boolean |
containsActorSession(int actorSessionID)
Determine if the ActorSession associated with the ActorSession ID is contained by this ApplicationInstance or not. |
int |
createNewActorSession(int aIID,
Session session)
Create a new ActorSession in the ApplicationInstance corresponding to the user Session object informations. |
java.util.Iterator |
enumerateActorSession()
Returns an iterator on the actor sessions vector. |
ActorSession |
getActorSession(int actorSessionID)
Returns the ActorSession object corresponding to the ActorSession ID. |
int |
getApplicationInstanceID()
Returns the ID of the ApplicationInstance. |
ApplicationInstanceInfos |
getApplicationInstanceInfos()
For Lobby service, this method provide informations of the ApplicationInstance. |
CustomTypes |
getCustomTypes()
Returns the encoder of the application associated with the application instance. |
int |
getMaxActors()
Returns the maximum number of actors can play the game session. |
int |
getMinActors()
Returns the minimum number of actors required to start the game session. |
int |
getOwnerAID()
Returns the ActorId of the ApplicationInstanceID owner. |
GASPServer |
getServer()
Returns the minimum number of actors required to start the game session. |
boolean |
isActorSessionEmpty()
Determine if the vector of ActorSession objects is empty or not. |
boolean |
isDestroyable()
Determine if the Owner Master Application must destroy the application instance or not. |
boolean |
isJoinable()
Determine if the the application instance is joignable by a player or not. |
boolean |
isPublic()
Determine if the ApplicationInstance is public or not. |
boolean |
isRunning()
Determine if the ApplicationInstance is running or not. |
boolean |
isStartable()
Determine if the the application instance is startable by the player owner or not. |
void |
raisePseudoModification(int actorSessionID,
java.lang.String pseudoname)
Raise a JoinEvent to all other players containing the new pseudo |
boolean |
removeActorSession(int actorSessionID)
Remove the ActorSession object corresponding to the ActorSessionID. |
int |
retrieveApplicationID()
Retrieve the applicationID from the master application instance. |
void |
sendDataToActorSession(int actorSessionID,
DataEvent dataEvent)
Send a dataEvent to a specific actorSession. |
void |
sendPlayersInfos(int aSID)
Send player info to the actor session ASID. |
void |
setApplicationInstanceName(java.lang.String appInstanceName)
Specify the name of the Application Instance. |
java.lang.String |
treatPseudo(java.lang.String name)
If the pseudo already exist in the AI modify it, else no modifications. |
Methods inherited from interface org.mega.gasp.listener.OnJoinEvent |
onJoinEvent |
Methods inherited from interface org.mega.gasp.listener.OnStartEvent |
onStartEvent |
Methods inherited from interface org.mega.gasp.listener.OnEndEvent |
onEndEvent |
Methods inherited from interface org.mega.gasp.listener.OnDataEvent |
onDataEvent |
Methods inherited from interface org.mega.gasp.listener.OnQuitEvent |
onQuitEvent |
Method Detail |
public int getApplicationInstanceID()
public GASPServer getServer()
public int getMinActors()
public int getMaxActors()
public int getOwnerAID()
public CustomTypes getCustomTypes()
public boolean isPublic()
public boolean isRunning()
public boolean isDestroyable()
public boolean isJoinable()
public boolean isStartable()
public int createNewActorSession(int aIID, Session session)
aIID
- the ApplicationInstancesession
- the Session object of the user
public ActorSession getActorSession(int actorSessionID)
actorSessionID
- the ActorSession ID
public boolean removeActorSession(int actorSessionID)
actorSessionID
- the ActorSesion ID
public boolean isActorSessionEmpty()
public int actorSessionSize()
public boolean containsActorSession(int actorSessionID)
actorSessionID
-
public ApplicationInstanceInfos getApplicationInstanceInfos()
public java.util.Iterator enumerateActorSession()
public void setApplicationInstanceName(java.lang.String appInstanceName)
appInstanceName
- public boolean addActorSession(ActorSession actorSession)
actorSession
- the ActorSession object
public void sendDataToActorSession(int actorSessionID, DataEvent dataEvent)
actorSessionID
- dataEvent
- public void sendPlayersInfos(int aSID)
aSID
- public java.lang.String treatPseudo(java.lang.String name)
name
-
public void raisePseudoModification(int actorSessionID, java.lang.String pseudoname)
actorSessionID
- public int retrieveApplicationID()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |