public abstract class DefaultLifecycleManager extends Object implements LifecycleManager
LifecycleAware services registered to OSGi and call their LifecycleAware.onStart() when
required.
The onStart method is called when the application is setup according to LifecycleManager.isApplicationSetUp(), the
plugin is enabled, and the plugin framework has started.
This class has concurrency controls for the case of concurrent service registration/deregistration with plugin and application
state activity. It does not account for concurrency of plugin notifications against themselves. This does not happen during
normal usage.| Constructor and Description |
|---|
DefaultLifecycleManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager,
com.atlassian.plugin.PluginAccessor pluginAccessor,
org.osgi.framework.BundleContext bundleContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
notifyOnStart()
An override point for subclasses that require callback notification after the initial start of the system.
|
void |
onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event) |
void |
onPluginFrameworkStarted(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event) |
void |
postConstruct() |
void |
preDestroy() |
void |
start()
Triggers
LifecycleAware.onStart() on all enabled LifecycleAware components. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisApplicationSetUppublic DefaultLifecycleManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager,
com.atlassian.plugin.PluginAccessor pluginAccessor,
org.osgi.framework.BundleContext bundleContext)
@PostConstruct public void postConstruct() throws Exception
Exception@PreDestroy public void preDestroy() throws Exception
Exceptionpublic void onPluginFrameworkStarted(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event)
public void onPluginEnabled(com.atlassian.plugin.event.events.PluginEnabledEvent event)
public void start()
LifecycleManagerLifecycleAware.onStart() on all enabled LifecycleAware components. This method can be called
multiple times but will only start components once and only once the plugin framework has started.start in interface LifecycleManagerprotected void notifyOnStart()
Copyright © 2015 Atlassian. All rights reserved.