public interface LifecycleListener
Implementations can be used to initialise database connections, indexes and other I/O resources which are common to many generators.
Implementations must provide an public
empty constructor for the init servlet
to invoke through reflection.
Modifier and Type | Method and Description |
---|---|
boolean |
start()
This method is called when Berlioz starts by the BerliozInit servlet's initialisation method.
|
boolean |
stop()
This method is called when Berlioz stops by the BerliozInit servlet's destroy method.
|
boolean start()
It is called after the system properties and global settings have been loaded.
This method should not throw any error. Errors must be handled internally and return false
.
Feedback on this method may be reported on System.out
and prefixed by
[BERLIOZ_INIT]
. For example:
[BERLIOZ_INIT] Checking required properties - OK [BERLIOZ_INIT] Initialising index in /WEB-INF/index - OK [BERLIOZ_INIT] Initialising database in /WEB-INF/db - OK
true
if the start was successful.boolean stop()
This method should not throw any error. Errors must be handled internally.
Feedback on this method may be reported on System.out
and prefixed by
[BERLIOZ_STOP]
. For example:
[BERLIOZ_STOP] Releasing all index resources OK [BERLIOZ_STOP] Closing database connections OK
true
if the stop was successful.Copyright © 2016 Allette Systems. All rights reserved.