helma.extensions.demo
Class DemoExtension

java.lang.Object
  extended by helma.extensions.HelmaExtension
      extended by helma.extensions.demo.DemoExtension

public class DemoExtension
extends HelmaExtension

a demo extension implementation, to activate this add extensions = helma.extensions.demo.DemoExtensions to your server.properties. a new global object demo that wraps helma.main.Server will be added to the scripting environment.


Constructor Summary
DemoExtension()
           
 
Method Summary
 void applicationStarted(Application app)
          called when an Application is started.
 void applicationStopped(Application app)
          called when an Application is stopped.
 void applicationUpdated(Application app)
          called when an Application's properties are have been updated.
 java.lang.String getName()
           
 void init(Server server)
          called by the Server at startup time. should check wheter the needed classes are present and throw a ConfigurationException if not.
 java.util.HashMap initScripting(Application app, ScriptingEngine engine)
          called by the ScriptingEngine when it is initizalized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemoExtension

public DemoExtension()
Method Detail

init

public void init(Server server)
          throws ConfigurationException
Description copied from class: HelmaExtension
called by the Server at startup time. should check wheter the needed classes are present and throw a ConfigurationException if not.

Specified by:
init in class HelmaExtension
Parameters:
server - ...
Throws:
ConfigurationException - ...

applicationStarted

public void applicationStarted(Application app)
                        throws ConfigurationException
Description copied from class: HelmaExtension
called when an Application is started. This should be synchronized when any self-initialization is performed.

Specified by:
applicationStarted in class HelmaExtension
Parameters:
app - ...
Throws:
ConfigurationException - ...

applicationStopped

public void applicationStopped(Application app)
Description copied from class: HelmaExtension
called when an Application is stopped. This should be synchronized when any self-destruction is performed.

Specified by:
applicationStopped in class HelmaExtension
Parameters:
app - ...

applicationUpdated

public void applicationUpdated(Application app)
Description copied from class: HelmaExtension
called when an Application's properties are have been updated. note that this will be called at startup once *before* applicationStarted().

Specified by:
applicationUpdated in class HelmaExtension
Parameters:
app - ...

initScripting

public java.util.HashMap initScripting(Application app,
                                       ScriptingEngine engine)
                                throws ConfigurationException
Description copied from class: HelmaExtension
called by the ScriptingEngine when it is initizalized. Throws a ConfigurationException when this type of ScriptingEngine is not supported. New methods and prototypes can be added to the scripting environment. New global vars should be returned in a HashMap with pairs of varname and ESObjects. This method should be synchronized, if it performs any other self-initialization outside the scripting environment.

Specified by:
initScripting in class HelmaExtension
Parameters:
app - ...
engine - ...
Returns:
...
Throws:
ConfigurationException - ...

getName

public java.lang.String getName()
Specified by:
getName in class HelmaExtension
Returns:
...


Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.