|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Platform is the base of the GAming Services Platform (GASP), the container of all GP representing objects. So it contains all MasterApplicationInstance objects in a vector. It hold all of the service instances (Lobby,...) and system instances (DB manager, ID manager, ...).
Method Summary | |
boolean |
containsMasterApplicationInstance(int applicationID)
Determine if the MasterApplicationInstance of the application associated with the application ID is initialized or not. |
int |
createAI(int sID,
int minActors,
int maxActors,
java.lang.String[] actors)
Provide to a user with a valid session ID to create an ApplicationInstance with a minimum start number of actors and a maximum number of actors. |
java.util.Iterator |
enumerateMasterApplicationInstance()
Returns an iterator on the MasterApplicationInstance vector. |
MasterApplicationInstance |
getActorOwner(int aID)
Return the MasterApplicationInstance containing the aID. |
ApplicationInstance |
getActorSessionOwner(int aSID)
Return the ApplicationInstance containing the aSID. |
DBManager |
getDBManager()
Return the platform DB manager . |
IDManager |
getIDManager()
Return the platform ID manager . |
Lobby |
getLobby()
Return the Lobby service. |
MasterApplicationInstance |
getMasterApplicationInstance(int applicationID)
Returns the MasterApplicationInstance associated with the application ID or if it is not already instantiates, initialize it. |
PropertiesReader |
getPropertiesReader()
Return the platform DB manager . |
MasterApplicationInstance |
getSessionOwner(int sID)
Return the MasterApplicationInstance containing the sID. |
boolean |
isMasterApplicationInstanceEmpty()
Determine if the vector of MasterApplicationInstance is empty or not. |
int |
joinAI(int sID,
int aIID)
Provide to a user with a valid session ID to join a specific ApplicationInstance of the application open by the user. |
int |
joinAIRnd(int sID)
Provide to a user with a valid session ID to join a random ApplicationInstance corresponded to tbe application opened by the user. |
int |
login(int aID,
java.lang.String username,
java.lang.String password)
Log a user in the platform, authentified by actorID, username and password. |
int |
masterApplicationInstanceSize()
Return the number of MasterApplicationInstance currently instantiated. |
void |
quit(int sID)
This method is called when a user quit the application. |
boolean |
removeMasterApplicationInstance(int applicationID)
Remove the MasterApplicationInstance associated with the application ID. |
Method Detail |
public MasterApplicationInstance getMasterApplicationInstance(int applicationID)
applicationID
- the application ID
public boolean removeMasterApplicationInstance(int applicationID)
applicationID
- the application ID
public boolean isMasterApplicationInstanceEmpty()
public int masterApplicationInstanceSize()
public java.util.Iterator enumerateMasterApplicationInstance()
public boolean containsMasterApplicationInstance(int applicationID)
applicationID
-
public Lobby getLobby()
public IDManager getIDManager()
public DBManager getDBManager()
public PropertiesReader getPropertiesReader()
public MasterApplicationInstance getSessionOwner(int sID)
sID
- the session ID
public ApplicationInstance getActorSessionOwner(int aSID)
aSID
- the actor session ID
public MasterApplicationInstance getActorOwner(int aID)
aID
- the actor ID
public int login(int aID, java.lang.String username, java.lang.String password)
aID
- the Actor ID attributed at the first loginusername
- password
-
public int joinAI(int sID, int aIID)
sID
- the Session IDaIID
- the ApplicationInstance ID
public int joinAIRnd(int sID)
sID
- the Session ID
public int createAI(int sID, int minActors, int maxActors, java.lang.String[] actors)
sID
- the Session IDminActors
- minimum number of actors for startingmaxActors
- maximum number of actorsactors
- a table of Actor ID
public void quit(int sID)
sID
- the Session ID
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |