|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
MasterApplicationInstance represents the container of all ApplicationInstance of a specific application. So a MasterApplicationInstance contains a vector of ApplicationInstance. It contains also a vector of Session objects, representing the Actors currently using the Application. Finally it contains a vector of the Actor objects, representing a link User-Application.
Method Summary | |
int |
actorSize()
Return the current number of Actor objects in the Actor vector. |
void |
addActor(Actor actor)
Add the Actor object actor to the vector of actors in the Master Application. |
int |
applicationInstanceSize()
Returns the current size of the vector of ApplicationInstance objects. |
boolean |
containsApplicationInstance(int applicationInstanceID)
Determine if the Application Instance associated with applicationInstanceID is hold by this Master Application. |
int |
createApplicationInstance(Session ownerSession,
int minActors,
int maxActors,
java.lang.String[] actors)
Create an Application Instance. |
int |
createNewSession(int aID)
Create a new session associated with the actor ID. |
java.util.Iterator |
enumerateActor()
Return the current number of Session objects in the Session vector. |
java.util.Iterator |
enumerateApplicationInstance()
Returns an ApplicationInstance vector iterator. |
java.util.Iterator |
enumerateSession()
Return the current number of Session objects in the Session vector. |
Actor |
getActor(int aID)
Return the Actor object associated with the actorID. |
java.util.Vector |
getActors()
|
ApplicationInstance |
getActorSessionAI(int aSID)
Returns the ApplicationInstance object containing the ActorSession linked to the Session. |
Session |
getAIDAssociatedSession(int aID)
Return the session associated to the aID. |
int |
getAnAIID()
Returns a random ApplicationInstance currently not started. |
int |
getApplicationID()
Returns the ID of the application managed by the Master Application Instance. |
ApplicationInstance |
getApplicationInstance(int applicationInstanceID)
Returns the required ApplicationInstance object. |
byte |
getApplicationModel()
Returns the model choosed for the application. |
Session |
getASIDAssociatedSession(int aSID)
Return the session associated to the aSID. |
int |
getMasterApplicationID()
Returns the ID of the Master Application Instance. |
Session |
getSession(int sID)
Returns the corresponding session |
java.util.Vector |
getSessions()
pas sūr que ces fonctions servent encore + fonctions de debuggage |
boolean |
isActorOwner(int aID)
Determine if the Master Application is the owner of the Actor object associated with the actorID. |
boolean |
isApplicationInstanceEmpty()
Determine if the vector of ApplicationInstance objects is currently empty or not. |
boolean |
isSessionOwner(int sID)
Determine if the MasterApplicationInstance is the owner of the session associated with the SessionID. |
boolean |
removeActor(int aID)
Remove the Actor object associated with the actorID. |
boolean |
removeApplicationInstance(int applicationInstanceID)
Remove the required Application Instance. |
boolean |
removeSession(int sID)
Remove the corresponding Session object. |
int |
sessionSize()
Return the current number of Session objects in the Session vector. |
void |
unlog(int sid)
Unlog the user represented by this session , delete Actor, Session, ActorSession objects linked to this user, and also the ApplicationInstance would created by this user. |
Method Detail |
public int getMasterApplicationID()
public int getApplicationID()
public byte getApplicationModel()
public int createApplicationInstance(Session ownerSession, int minActors, int maxActors, java.lang.String[] actors)
ownerSession
- the Session object representing the actor who create the Application Instance.minActors
- represents the minimum number of actors required to start the Application Instance.maxActors
- represents the maximum number of actors can play this Application Instance.actors
- if the Application Instance is private this vector contains the required actors
else if it is a public Application Instance this vector is empty.
public ApplicationInstance getApplicationInstance(int applicationInstanceID)
applicationInstanceID
- the ID of the required Application Instance
public boolean removeApplicationInstance(int applicationInstanceID)
applicationInstanceID
-
public boolean isApplicationInstanceEmpty()
public int applicationInstanceSize()
public java.util.Iterator enumerateApplicationInstance()
public boolean containsApplicationInstance(int applicationInstanceID)
applicationInstanceID
-
public int getAnAIID()
public void unlog(int sid)
sid
- public ApplicationInstance getActorSessionAI(int aSID)
aSID
- the ActorSession ID
public Session getAIDAssociatedSession(int aID)
aID
-
public Session getASIDAssociatedSession(int aSID)
aSID
-
public int createNewSession(int aID)
aID
- the actor ID
public Session getSession(int sID)
sID
- the session ID
public boolean removeSession(int sID)
sID
-
public boolean isSessionOwner(int sID)
sID
- the Session ID
public int sessionSize()
public java.util.Iterator enumerateSession()
public void addActor(Actor actor)
actor
- the Actor object to addpublic Actor getActor(int aID)
aID
- the actor ID
public boolean removeActor(int aID)
aID
- the actor ID
public boolean isActorOwner(int aID)
aID
- the actor ID
public int actorSize()
public java.util.Iterator enumerateActor()
public java.util.Vector getSessions()
public java.util.Vector getActors()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |