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 a start lifecycle event once and only once.
 
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 a start lifecycle event once and only once. This method can be called multiple times but will only fire an onStart event once and only when application is already set up.

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 © 2011 Atlassian. All Rights Reserved.