public interface LifecycleAware
onStart() will be invoked:
onStop() will be invoked only if onStart() was invoked, when dependencies are still available:
Note: for this to work a component must be exposed as an OSGi service with LifecycleAware as a declared
interface. For transformerless plugins using the atlassian spring scanner, this can be done using the ExportAsService
annotation. For transformed plugins, use a <component> with a public="true" attribute and an
<interface>com.atlassian.sal.api.lifecycle.LifecycleAware</interface> child element. For example:
<component key="my-cool-component" class="com.atlassian.stash.MyCoolComponent" public="true">
<interface>com.atlassian.sal.api.lifecycle.LifecycleAware</interface>
</component>
| Modifier and Type | Method and Description |
|---|---|
void |
onStart()
Notification that the plugin is enabled and the application is started, including after being restored from backup.
|
void |
onStop()
Notification that the plugin is going to be stopped.
|
void onStart()
void onStop()
Will be invoked if previously notified with onStart(), before the plugin is disabled or framework is
shut down.
Copyright © 2019 Atlassian. All rights reserved.