Package com.atlassian.jira.plugin
Class OsgiServiceTrackerCacheImpl
java.lang.Object
com.atlassian.jira.plugin.OsgiServiceTrackerCacheImpl
- All Implemented Interfaces:
InitializingComponent,OsgiServiceTrackerCache
public class OsgiServiceTrackerCacheImpl
extends Object
implements OsgiServiceTrackerCache, InitializingComponent
-
Constructor Summary
ConstructorsConstructorDescriptionOsgiServiceTrackerCacheImpl(com.atlassian.plugin.osgi.container.OsgiContainerManager osgiContainerManager, com.atlassian.plugin.event.PluginEventManager pluginEventManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled after all the beans are constructed and the ApplicationContext is fully populated.<T> TgetOsgiComponentOfType(Class<T> clazz) Retrieves and returns a public component from OSGi land via its class.voidonOsgiContainerStartedEvent(com.atlassian.plugin.osgi.container.OsgiContainerStartedEvent event) Registers theserviceTrackerscache in JIRA instrumentation.voidonPluginFrameworkShutdownEvent(com.atlassian.plugin.osgi.container.OsgiContainerStoppedEvent event)
-
Constructor Details
-
OsgiServiceTrackerCacheImpl
public OsgiServiceTrackerCacheImpl(com.atlassian.plugin.osgi.container.OsgiContainerManager osgiContainerManager, com.atlassian.plugin.event.PluginEventManager pluginEventManager)
-
-
Method Details
-
afterInstantiation
Description copied from interface:InitializingComponentCalled after all the beans are constructed and the ApplicationContext is fully populated. Order of execution is order of bean creation, driven by InitializingComponentProcessor.- Specified by:
afterInstantiationin interfaceInitializingComponent- Throws:
Exception
-
getOsgiComponentOfType
Retrieves and returns a public component from OSGi land via its class. This method can be used to retrieve a component provided via a plugins OSGi bundle. Please note that components returned via this method should NEVER be cached (e.g. in a field) as they may be refreshed at any time as a plugin is enabled/disabled or the ComponentManager is reinitialised (after an XML import).- Specified by:
getOsgiComponentOfTypein interfaceOsgiServiceTrackerCache- Parameters:
clazz- The interface class- Returns:
- The component, or null if not found
- Since:
- v6.4
-
onOsgiContainerStartedEvent
public void onOsgiContainerStartedEvent(com.atlassian.plugin.osgi.container.OsgiContainerStartedEvent event) Registers theserviceTrackerscache in JIRA instrumentation. -
onPluginFrameworkShutdownEvent
public void onPluginFrameworkShutdownEvent(com.atlassian.plugin.osgi.container.OsgiContainerStoppedEvent event)
-