|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.wrq.vhi.script.api.LifeCycleEventHandler authorization.LifeCycleHandler
public class LifeCycleHandler
Implement client authentication and authorization.
This class implements the modelLoaded(com.wrq.vhi.script.api.ModelLoadedEvent)
and modelUnloaded(com.wrq.vhi.script.api.ModelUnloadedEvent)
events to load and unload a user database stored in the model hashmap.
This class also implements the authenticateUser(com.wrq.vhi.script.api.AuthenticateUserEvent)
event to
Field Summary | |
---|---|
static java.lang.String |
description
|
Fields inherited from interface com.wrq.vhi.script.api.EventHandler |
---|
DEFAULT_TIMEOUT |
Constructor Summary | |
---|---|
LifeCycleHandler()
|
Method Summary | |
---|---|
boolean |
authenticateUser(com.wrq.vhi.script.api.AuthenticateUserEvent event)
Authenticate a user attempting to connect to the model. |
void |
modelLoaded(com.wrq.vhi.script.api.ModelLoadedEvent event)
Initialize the client authorization and host credential databases. |
void |
modelUnloaded(com.wrq.vhi.script.api.ModelUnloadedEvent event)
Delete the client authorization and host credential databases. |
Methods inherited from class com.wrq.vhi.script.api.LifeCycleEventHandler |
---|
clientSessionCreated, clientSessionDestroyed, hostSessionCreated, hostSessionDestroyed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String description
Constructor Detail |
---|
public LifeCycleHandler()
Method Detail |
---|
public void modelLoaded(com.wrq.vhi.script.api.ModelLoadedEvent event)
This method creates object instances which implement the
IUserAuthorizer
and
IHostCredentialMap
interfaces and stores them in the model hashmap for use by the
authenticateUser(com.wrq.vhi.script.api.AuthenticateUserEvent)
and
executeProcedure
events.
modelLoaded
in class com.wrq.vhi.script.api.LifeCycleEventHandler
event
- the event instancepublic void modelUnloaded(com.wrq.vhi.script.api.ModelUnloadedEvent event)
These databases are removed from the model hashmap as the model is unloaded. This is not strictly required: the model hashmap and its contents will be disposed of by the script manager. But if the hashmap contained a resource which needed to be closed, this would be the time to do it.
modelUnloaded
in class com.wrq.vhi.script.api.LifeCycleEventHandler
event
- the event instancepublic boolean authenticateUser(com.wrq.vhi.script.api.AuthenticateUserEvent event) throws com.wrq.apptrieve.agent.ApptrieveException
This method first authenticates the client credentials against the set of users allowed to access this model.
If access is permitted, the userID and password model variables are initialized with the host credentials for this client before logging in to the host.
authenticateUser
in class com.wrq.vhi.script.api.LifeCycleEventHandler
event
- the event instance
com.wrq.apptrieve.agent.ApptrieveException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |