Class PluginsComponentManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.runtime.plugin.component.ThreadSafeComponentManager<Object>
org.ametys.runtime.plugin.component.PluginsComponentManager
- All Implemented Interfaces:
LogEnabled,Disposable,Initializable,ComponentManager,Contextualizable,Serviceable
public class PluginsComponentManager
extends ThreadSafeComponentManager<Object>
implements ComponentManager
Implementation of an Avalon ComponentManager handling the PluginAware and ParentAware interfaces.
See the
See the
ThreadSafeComponentManager for more details.-
Field Summary
Fields inherited from class org.ametys.runtime.plugin.component.ThreadSafeComponentManager
_manager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtensionPoint(String pluginName, String point, Class<? extends ExtensionPoint> extensionPoint, Configuration configuration, Collection<ExtensionDefinition> extensions) Add a new extension point, and its extensions, to the manager.booleanhasComponent(String role) voidProperly initialize of the Child handlers.Return an instance of a component based on a Role.voidMethods inherited from class org.ametys.runtime.plugin.component.ThreadSafeComponentManager
addComponent, contextualize, dispose, hasComponent, hasRole, serviceMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
PluginsComponentManager
Constructor.- Parameters:
parentManager- the parent manager
-
-
Method Details
-
initialize
Description copied from class:ThreadSafeComponentManagerProperly initialize of the Child handlers.- Specified by:
initializein interfaceInitializable- Overrides:
initializein classThreadSafeComponentManager<Object>- Throws:
Exception
-
hasComponent
- Specified by:
hasComponentin interfaceComponentManager
-
lookup
Description copied from class:ThreadSafeComponentManagerReturn an instance of a component based on a Role. The Role is usually the Interface Fully Qualified Name(FQN).- Specified by:
lookupin interfaceComponentManager- Overrides:
lookupin classThreadSafeComponentManager<Object>- Parameters:
role- The key name of theComponentto retrieve.- Returns:
- the desired component or null if no component exist for the given role
- Throws:
ComponentException- if an error occurs
-
release
- Specified by:
releasein interfaceComponentManager
-
addExtensionPoint
public void addExtensionPoint(String pluginName, String point, Class<? extends ExtensionPoint> extensionPoint, Configuration configuration, Collection<ExtensionDefinition> extensions) Add a new extension point, and its extensions, to the manager.- Parameters:
pluginName- the plugin containing the extension pointpoint- the extension point name.extensionPoint- the class of the extension point.configuration- the configuration for the extension point.extensions- definitions of extensions.
-