jACOB 2.7 API Documentation.

de.tif.jacob.screen.event
Class IApplicationEventHandler

java.lang.Object
  extended by EventHandler
      extended by de.tif.jacob.screen.event.IApplicationEventHandler

public abstract class IApplicationEventHandler
extends EventHandler

Abstract event handler class for the application object. Derived implementations of this event handler class have to be used to "hook" application-specific business logic to the application object.


Field Summary
static java.lang.String RCS_ID
          The internal revision control system id.
static java.lang.String RCS_REV
          The internal revision control system id in short form.
 
Constructor Summary
IApplicationEventHandler()
           
 
Method Summary
abstract  void onCreate(IClientContext context, IApplication app)
          This hook method will be called, if an application GUI instance (i.e. the application main window) has been created.
 void onLogin(IClientContext context, IApplication app)
          This hook method will be called, if the user logs into an application.
abstract  void onShutdown()
          This hook method will be called, if the application is shutdowned or the state of the application is changed from 'productive' to 'inactive'.
abstract  void onStartup()
          This hook method will be called, if the application is started up (i.e.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RCS_ID

public static final transient java.lang.String RCS_ID
The internal revision control system id.

See Also:
Constant Field Values

RCS_REV

public static final transient java.lang.String RCS_REV
The internal revision control system id in short form.

See Also:
Constant Field Values
Constructor Detail

IApplicationEventHandler

public IApplicationEventHandler()
Method Detail

onStartup

public abstract void onStartup()
                        throws java.lang.Exception
This hook method will be called, if the application is started up (i.e. during server run up) or the state of the application is changed from 'inactive' to 'productive'.

You can startup some additional worker threads. Be in mind - you have NO access to your application database at this point.

If you throw an exception, the application will not be activated and hence does not appear in the login screen. The application will be marked as undeployed in the administration application.

Throws:
java.lang.Exception

onShutdown

public abstract void onShutdown()
                         throws java.lang.Exception
This hook method will be called, if the application is shutdowned or the state of the application is changed from 'productive' to 'inactive'.

You should shutdown and free your additional allocated resources here.

Be in mind - you have NO access to your application database at this point.

Throws:
java.lang.Exception

onLogin

public void onLogin(IClientContext context,
                    IApplication app)
This hook method will be called, if the user logs into an application.

You can access the application database at this point.

Note: In contrast to onCreate(IClientContext, IApplication) this hook method will be called once upon logon, when a new user session and, therefore the first application GUI instance (i.e. the application main window) is created.

Parameters:
context - The current client context of the application
app - The application GUI instance which has been created on logon.

onCreate

public abstract void onCreate(IClientContext context,
                              IApplication app)
This hook method will be called, if an application GUI instance (i.e. the application main window) has been created.
For each browser window an application instance will be instantiated.

You can access the application database at this point.

Note: It is possible that a logged in user has more than one application instance. This method will be called for each instance.

Parameters:
context - The current client context of the application
app - The application GUI instance itself.

jACOB 2.7 API Documentation.