Package helma.extensions.demo
Class DemoExtension
java.lang.Object
helma.extensions.HelmaExtension
helma.extensions.demo.DemoExtension
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
called when an Application is started.void
called when an Application is stopped.void
called when an Application's properties are have been updated.getName()
void
called by the Server at startup time.initScripting
(Application app, ScriptingEngine engine) called by the ScriptingEngine when it is initizalized.
-
Constructor Details
-
DemoExtension
public DemoExtension()
-
-
Method Details
-
init
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
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
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
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
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
- Specified by:
getName
in classHelmaExtension
- Returns:
- ...
-