abbreviationdb
Class LifeCycleHandler

java.lang.Object
  extended by com.wrq.vhi.script.api.LifeCycleEventHandler
      extended by abbreviationdb.LifeCycleHandler
All Implemented Interfaces:
com.wrq.vhi.script.api.EventHandler

public class LifeCycleHandler
extends com.wrq.vhi.script.api.LifeCycleEventHandler

Create and destroy abbreviation database connection.

This event handler uses the model load and model unload events to manage a database connection object which translates abbreviations.


Field Summary
static int authenticateUserTimeout
          Timeout in seconds for the authenticateUser() event.
static int clientSessionCreatedTimeout
          Timeout in seconds for the clientSessionCreated() event.
static int clientSessionDestroyedTimeout
          Timeout in seconds for the clientSessionDestroyed() event.
static java.lang.String description
           
static int hostSessionCreatedTimeout
          Timeout in seconds for the hostSessionCreated() event.
static int hostSessionDestroyedTimeout
          Timeout in seconds for the hostSessionDestroyed() event.
static int modelLoadedTimeout
          Timeout in seconds for the modelLoaded() event.
static int modelUnloadedTimeout
          Timeout in seconds for the modelUnloaded() event.
 
Fields inherited from interface com.wrq.vhi.script.api.EventHandler
DEFAULT_TIMEOUT
 
Constructor Summary
LifeCycleHandler()
           
 
Method Summary
 void modelLoaded(com.wrq.vhi.script.api.ModelLoadedEvent event)
          Create a database connection shared by all model sessions..
 void modelUnloaded(com.wrq.vhi.script.api.ModelUnloadedEvent event)
          Close and release the shared database connection.
 
Methods inherited from class com.wrq.vhi.script.api.LifeCycleEventHandler
authenticateUser, clientSessionCreated, clientSessionDestroyed, hostSessionCreated, hostSessionDestroyed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

description

public static final java.lang.String description
See Also:
Constant Field Values

modelLoadedTimeout

public static final int modelLoadedTimeout
Timeout in seconds for the modelLoaded() event. A value of DEFAULT_TIMEOUT means the event will use the model defined default event timeout.

See Also:
Constant Field Values

modelUnloadedTimeout

public static final int modelUnloadedTimeout
Timeout in seconds for the modelUnloaded() event. A value of DEFAULT_TIMEOUT means the event will use the model defined default event timeout.

See Also:
Constant Field Values

hostSessionCreatedTimeout

public static final int hostSessionCreatedTimeout
Timeout in seconds for the hostSessionCreated() event. A value of DEFAULT_TIMEOUT means the event will use the model defined default event timeout.

See Also:
Constant Field Values

hostSessionDestroyedTimeout

public static final int hostSessionDestroyedTimeout
Timeout in seconds for the hostSessionDestroyed() event. A value of DEFAULT_TIMEOUT means the event will use the model defined default event timeout.

See Also:
Constant Field Values

clientSessionCreatedTimeout

public static final int clientSessionCreatedTimeout
Timeout in seconds for the clientSessionCreated() event. A value of DEFAULT_TIMEOUT means the event will use the model defined default event timeout.

See Also:
Constant Field Values

clientSessionDestroyedTimeout

public static final int clientSessionDestroyedTimeout
Timeout in seconds for the clientSessionDestroyed() event. A value of DEFAULT_TIMEOUT means the event will use the model defined default event timeout.

See Also:
Constant Field Values

authenticateUserTimeout

public static final int authenticateUserTimeout
Timeout in seconds for the authenticateUser() event. A value of DEFAULT_TIMEOUT means the event will use the model defined default event timeout.

See Also:
Constant Field Values
Constructor Detail

LifeCycleHandler

public LifeCycleHandler()
Method Detail

modelLoaded

public void modelLoaded(com.wrq.vhi.script.api.ModelLoadedEvent event)
Create a database connection shared by all model sessions..

This event handler cannot throw an exception. If the database connection constructor throws an exception the exception is logged for later diagnosis.

Overrides:
modelLoaded in class com.wrq.vhi.script.api.LifeCycleEventHandler
Parameters:
event - the event instance

modelUnloaded

public void modelUnloaded(com.wrq.vhi.script.api.ModelUnloadedEvent event)
Close and release the shared database connection.

Overrides:
modelUnloaded in class com.wrq.vhi.script.api.LifeCycleEventHandler
Parameters:
event - the event instance