|
|||||||||
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.VisitorAgent
A VisitorAgent is the actor working on behalf of a user that has logged into
a PaP domain as visitor. The VisitorAgent has unlike the UserAgent not a
Session object for the user. This way no session can be either suspended or
resumed by a VisitorAgent. The VisitorAgent is used when a user loggs into a
domain other than his home domain. He then gets certain default rights and
capabilities. In order for a user to get his userprofile, his session and
his actual rights and capabilities he needs to login to his Director from
the VisitorAgent. The VisitorAgent will then be plugged out and a UserAgent
will be plugged in.
Every VisitorAgent has an reference to a VisitorWindow which acts as the
Graphical User Interface (GUI) of the VisitorAgent. The VisitorWindow contains to tables;
the plugin table and the plugout table. The VisitorAgent reads the file
RoleList_Visitor.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
,
VisitorWindow
, Serialized FormInner Class Summary | |
class |
VisitorAgent.CloseWindowThread
This thread is started when an ActorPlugOut 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 int |
unique
Increasing number used for naming of actors |
private VisitorWindow |
window
The reference to the VisitorWindow, the GUI of the VisitorAgent. |
private XMLFileUtil |
xfu
Reference to the XMLFileUtil used for reading the file ActorList_Visitor.xml. |
Fields inherited from class PaP.Actor |
bf, context, fh |
Constructor Summary | |
VisitorAgent()
Creates a new VisitorAgent. |
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 VisitorAgent. |
private int |
getUnique()
Returns a unigue number that is used to name the actors being plugged in by the VisitorAgent. |
void |
loginUserRemotely(java.lang.String directorGAI,
java.lang.String username,
java.lang.String password,
boolean resumeSession)
Sends a configured LoginRequest of type REMOTE to the Director. |
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 VisitorAgent. |
void |
setCodebase(java.lang.String url)
Sets the URL to use as codebase when actors are plugged in. |
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 VisitorWindow window
private XMLFileUtil xfu
private java.lang.String codebase
private int unique
private java.util.Hashtable pluggedInActors
Constructor Detail |
public VisitorAgent()
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 loginUserRemotely(java.lang.String directorGAI, java.lang.String username, java.lang.String password, boolean resumeSession) throws java.lang.Exception
directorGAI
- The GAI of the Director of the user's home domain.username
- The username of the user logging in.password
- The password of the user logging in.resumeSession
- If true the user's stored session is resumed, else
a new session is created.java.lang.Exception
- if something goes wrong.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()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |