The Kettle Lifecycle Plugin is provided as a way for your plugin to be notified upon Kettle Environment initialization and termination. This gives a plugin a chance to initialize at Kettle Environment initialization time.
A Kettle lifecycle listener plugin's callbacks will be executed at the following times:
- KettleLifecycleListener.onEnvironmentInit(): During KettleEnvironment.init(), after plugins have been loaded but before the initialization flag has been set on KettleEnvironment. Throwing a severe LifecycleException during onEnvironmentInit() will prevent the Kettle Environment from initializing.
- KettleLifecycleListener.onEnvironmentShutdown(): During JVM termination (specifically a Runtime shutdown hook). Throwing an exception from this method will have no effect.
Writing your plugin
A Kettle Lifecycle Listener Plugin may only be defined by annotation: