Package com.atlassian.greenhopper
Class Launcher
java.lang.Object
com.atlassian.greenhopper.Launcher
- All Implemented Interfaces:
com.atlassian.sal.api.lifecycle.LifecycleAware
This is the main entry point for GreenHopper. All initialisation should take place here.
We can't listen to PluginDisableEvent, because these happen after the Spring context has already been destroyed.
- Author:
- ahennecke
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidonClearCache(com.atlassian.jira.event.ClearCacheEvent clearCacheEvent) Called when Jira restores data but does NOT re-start the plugin systemfinal voidonPluginStarted(com.atlassian.plugin.event.events.PluginEnabledEvent pluginEnabledEvent) voidFirst event in the lifecycle: Spring context comes up.voidThird event we're interested in: The Spring context shuts down.voidonStart()Second event in the lifecycle: System runs (this comes after the plugin framework events)voidonStop()
-
Field Details
-
log
-
-
Constructor Details
-
Launcher
public Launcher()
-
-
Method Details
-
onSpringContextStarted
@PostConstruct public void onSpringContextStarted()First event in the lifecycle: Spring context comes up. -
onStart
public void onStart()Second event in the lifecycle: System runs (this comes after the plugin framework events)- Specified by:
onStartin interfacecom.atlassian.sal.api.lifecycle.LifecycleAware
-
onPluginStarted
@EventListener public final void onPluginStarted(com.atlassian.plugin.event.events.PluginEnabledEvent pluginEnabledEvent) -
onClearCache
@EventListener public final void onClearCache(com.atlassian.jira.event.ClearCacheEvent clearCacheEvent) Called when Jira restores data but does NOT re-start the plugin system This is done as an optimisation for functional testing but it can trip you up if you are retaining state.- Parameters:
clearCacheEvent- empty event which is not of much use to propagate.
-
onSpringContextStopped
@PreDestroy public void onSpringContextStopped()Third event we're interested in: The Spring context shuts down. -
onStop
public void onStop()- Specified by:
onStopin interfacecom.atlassian.sal.api.lifecycle.LifecycleAware
-