com.atlassian.sal.core.lifecycle
Class DefaultLifecycleManager

java.lang.Object
  extended by com.atlassian.sal.core.lifecycle.DefaultLifecycleManager
All Implemented Interfaces:
LifecycleManager

public abstract class DefaultLifecycleManager
extends Object
implements LifecycleManager


Constructor Summary
DefaultLifecycleManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
           
 
Method Summary
 void destroy()
          Unregister from the PluginEventManager.
protected  void notifyOnStart()
           
 void onBind(LifecycleAware service, Map properties)
          Called by spring-osgi when when new LifecycleAware service is installed.
 void onFrameworkStart(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event)
          This method will be invoked by PluginEventManager when PluginFrameworkStartedEvent event occurs.
 void setLifecycleAwareListeners(List<LifecycleAware> listeners)
           
 void start()
          Triggers LifecycleAware.onStart() on all enabled LifecycleAware components.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.sal.api.lifecycle.LifecycleManager
isApplicationSetUp
 

Constructor Detail

DefaultLifecycleManager

public DefaultLifecycleManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
Method Detail

onFrameworkStart

public void onFrameworkStart(com.atlassian.plugin.event.events.PluginFrameworkStartedEvent event)
This method will be invoked by PluginEventManager when PluginFrameworkStartedEvent event occurs. PluginEventManager uses methods called "channel" and methods with annotation "@PluginEventListener" to notify a registered listeners about events. See DefaultPluginEventManager for more details on this black magic.

Parameters:
event -

start

public void start()
Description copied from interface: LifecycleManager
Triggers LifecycleAware.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.

Specified by:
start in interface LifecycleManager

onBind

public void onBind(LifecycleAware service,
                   Map properties)
Called by spring-osgi when when new LifecycleAware service is installed. Defined in "spring-components.xml" in "META-INF/spring/"

Parameters:
service - the service to notify
properties - ignored

destroy

public void destroy()
Unregister from the PluginEventManager.

Since:
2.3.0

notifyOnStart

protected void notifyOnStart()

setLifecycleAwareListeners

public void setLifecycleAwareListeners(List<LifecycleAware> listeners)


Copyright © 2015 Atlassian. All rights reserved.