|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--PaP.Actor | +--PaP.ApplicationActor | +--User.v1_1.UserAgent
A UserAgent is the actor working on behalf of a user that has logged into a
PaP domain. The UserAgent receives a Session object from the Director that
contains stored information from the user's last saved session. If the user
has specified that he wants to resume a stored session, the UserAgent will
attemt to plugin all the actors that were plugged in when the user suspended
his session, set the actors' state to the saved state and plugin all the
RoleFigures that were plugged in.
Every UserAgent has an reference to a UserWindow which is the Graphical
User Interface (GUI) of the UserAgent. The UserWindow contains to tables;
the plugin table and the plugout table. The UserAgent reads the file
RoleList_User.xml for a list of plays and roles that the user can select to
plugin and this list is shown in the plugin table. Everytime a user plugs in
an actor to play the specified role, the GAI of the actor is added to the
plugout table. This table contains a list of actors that the user can select
to plugout.
Session
,
UserWindow
, Serialized FormInner Class Summary | |
class |
UserAgent.CloseWindowThread
This thread is started when an ActorPlugOut request is received. |
class |
UserAgent.ResumeSessionThread
This thread is started when a SessionResume request is received. |
Field Summary | |
private java.lang.String |
codebase
URL used as codebase when actors are plugged in. |
private boolean |
initiated
Indicates wether initial ActorPlugIn has been performed or not |
private java.util.Hashtable |
pluggedInActors
Hashtable containing plugged in actors |
private Session |
session
The session object of the user of this UserAgent |
private int |
unique
Increasing number used for naming of actors |
private UserWindow |
window
The reference to the UserWindow, the GUI of the UserAgent. |
private XMLFileUtil |
xfu
Reference to the XMLFileUtil used for reading the file ActorList_User.xml. |
Fields inherited from class PaP.Actor |
bf, context, fh |
Constructor Summary | |
UserAgent()
Creates a new UserAgent. |
Method Summary | |
RequestResult |
applicationActorEntry(RequestPars rpars)
This method is the common entry point for all external requests to this actor. |
void |
closeApplication()
This method is used by the GUI to notify that the user wants to close the application. |
private void |
dbg(java.lang.String dbg)
Sends debug information to this actor's BaseFrame window, which is an interactive debug client window for several entities. |
java.lang.String |
getCodebase()
Returns the current URL used as codebase. |
java.lang.String[] |
getPluggedInActors()
Returns a string array with the GAI of all the actors that have been plugged in by this UserAgent. |
private int |
getUnique()
Returns a unigue number that is used to name the actors being plugged in by the UserAgent. |
static void |
main(java.lang.String[] args)
Used for debugging. |
void |
plugInActor(java.lang.String playName,
java.lang.String version,
java.lang.String roleName,
java.lang.String plugInLocation)
Plugs in an actor with the specified role. |
void |
plugOutActor(java.lang.String gai)
Plugs out the actor with the specified GAI. |
void |
plugOutAllActors()
Pluggs out all the actors plugged in by this UserAgent. |
private void |
resumeSession()
Resumes the user's session based on the information contained in the Session-object received in a SessionResume request. |
void |
setCodebase(java.lang.String url)
Sets the URL to use as codebase when actors are plugged in. |
void |
suspendSession()
Suspends the user's session.Gathers the actor's state information by sending them a SessionSuspend request. |
void |
windowDebug(java.lang.String dbg)
Sends debug information to this actor's BaseFrame window, which is an interactive debug client window for several entities. |
Methods inherited from class PaP.Actor |
findRoleSession, getGAI, start, status, term |
Methods inherited from class java.lang.Object |
|
Field Detail |
private boolean initiated
private UserWindow window
private XMLFileUtil xfu
private java.lang.String codebase
private int unique
private java.util.Hashtable pluggedInActors
private Session session
Constructor Detail |
public UserAgent()
Method Detail |
public RequestResult applicationActorEntry(RequestPars rpars) throws java.lang.Exception
applicationActorEntry
in class ApplicationActor
rpars
- Instance of RequestPars which specifies type of request and
additional parametres to the request.java.lang.Exception
- public void closeApplication() throws java.lang.Exception
public java.lang.String getCodebase()
public java.lang.String[] getPluggedInActors()
public void plugInActor(java.lang.String playName, java.lang.String version, java.lang.String roleName, java.lang.String plugInLocation) throws java.lang.Exception
playname
- The name of the Play the specified role belongs to.version
- The version of the Play wanted.role
- The name of the role of the actor to be plugged in.plugInLocation
- Specifies the node where the actor is plugged in.java.lang.Exception
- if something goes wrong.public void plugOutActor(java.lang.String gai) throws java.lang.Exception
gai
- Specifies which RoleSession in the hashtable to plugout.An
- Exception is thrown if something goes wrong or if the request fails.public void plugOutAllActors()
plugOutActor(java.lang.String)
public void setCodebase(java.lang.String url)
url
- The new codebase.public void windowDebug(java.lang.String dbg)
dbg
- The debug information to be sent.private void dbg(java.lang.String dbg)
dbg
in class ApplicationActor
dbg
- The debug information to be sent.private int getUnique()
private void resumeSession()
public void suspendSession()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |