Package helma.extensions.demo
Class DemoExtension
- java.lang.Object
-
- helma.extensions.HelmaExtension
-
- helma.extensions.demo.DemoExtension
-
public class DemoExtension extends HelmaExtension
a demo extension implementation, to activate this addextensions = helma.extensions.demo.DemoExtensions
to yourserver.properties
. a new global objectdemo
that wraps helma.main.Server will be added to the scripting environment.
-
-
Constructor Summary
Constructors Constructor Description DemoExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.java.util.HashMap
initScripting(Application app, ScriptingEngine engine)
called by the ScriptingEngine when it is initizalized.
-
-
-
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 classHelmaExtension
- 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 classHelmaExtension
- 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 classHelmaExtension
- 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 classHelmaExtension
- 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 classHelmaExtension
- Parameters:
app
- ...engine
- ...- Returns:
- ...
- Throws:
ConfigurationException
- ...
-
getName
public java.lang.String getName()
- Specified by:
getName
in classHelmaExtension
- Returns:
- ...
-
-