com.atlassian.jira.plugin
Class JiraFailedPluginTracker
java.lang.Object
com.atlassian.jira.plugin.JiraFailedPluginTracker
- All Implemented Interfaces:
- com.atlassian.plugin.exception.PluginExceptionInterception
public class JiraFailedPluginTracker
- extends Object
- implements com.atlassian.plugin.exception.PluginExceptionInterception
Plugins form a big part of what Atlassian software does. However we don't do a good job in trying to know what
plugins are loaded and importantly which ones have failed to load.
This class is used to track what plugins are expected to be loaded, what did load as expected and what failed to
load.
- Since:
- v6.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JiraFailedPluginTracker
public JiraFailedPluginTracker(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
trackLoadingPlugin
public void trackLoadingPlugin(com.atlassian.plugin.Plugin plugin,
com.atlassian.plugin.PluginArtifact pluginArtifact)
- This is called then the PluginFactory has decided it can create a plugin BUT it hasn't started it and hence
resolved its dependencies
- Parameters:
plugin
- the plugin that has been created by the PluginFactory but not resolvedpluginArtifact
- the artifact used to load this plugin
onPluginEnabledEvent
public void onPluginEnabledEvent(com.atlassian.plugin.event.events.PluginEnabledEvent enabledEvent)
onPluginDisabledEvent
public void onPluginDisabledEvent(com.atlassian.plugin.event.events.PluginDisabledEvent disabledEvent)
onServiceDependencyWaitStarting
public void onServiceDependencyWaitStarting(com.atlassian.plugin.osgi.event.PluginServiceDependencyWaitStartingEvent event)
onServiceDependencyWaitEnded
public void onServiceDependencyWaitEnded(com.atlassian.plugin.osgi.event.PluginServiceDependencyWaitEndedEvent event)
onPluginContainerFailed
public void onPluginContainerFailed(com.atlassian.plugin.event.events.PluginContainerFailedEvent event)
throws com.atlassian.plugin.IllegalPluginStateException
- Called when the plugin container for the bundle has failed to be created. This means the bundle is still active,
but the plugin container is not available, so for our purposes, the plugin shouldn't be enabled.
- Parameters:
event
- The plugin container failed event
- Throws:
com.atlassian.plugin.IllegalPluginStateException
- If the plugin key hasn't been set yet
onEnableException
public boolean onEnableException(com.atlassian.plugin.Plugin plugin,
Exception pluginException)
- Specified by:
onEnableException
in interface com.atlassian.plugin.exception.PluginExceptionInterception
getFailedPlugins
public Iterable<JiraFailedPluginTracker.PluginInfo> getFailedPlugins()
- Returns:
- the list if plugins that failed to load
getUnaccountedForPlugins
public Iterable<JiraFailedPluginTracker.PluginInfo> getUnaccountedForPlugins()
- Returns:
- the list of plugins that loaded as plugin artifacts but never resolved into actual failed or loaded
plugins. This list REALLY should be empty once the plugin system has started and the the plugins have
been otherwise we have a serious problem.
Copyright © 2002-2013 Atlassian. All Rights Reserved.