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 theThreadSafeComponentManager
for more details.
-
-
Field Summary
-
Fields inherited from class org.ametys.runtime.plugin.component.ThreadSafeComponentManager
_manager
-
-
Constructor Summary
Constructors Constructor Description PluginsComponentManager(ComponentManager parentManager)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.boolean
hasComponent(String role)
void
initialize()
Properly initialize of the Child handlers.Component
lookup(String role)
Return an instance of a component based on a Role.void
release(Component object)
-
Methods inherited from class org.ametys.runtime.plugin.component.ThreadSafeComponentManager
addComponent, contextualize, dispose, hasComponent, hasRole, service
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Constructor Detail
-
PluginsComponentManager
public PluginsComponentManager(ComponentManager parentManager)
Constructor.- Parameters:
parentManager
- the parent manager
-
-
Method Detail
-
initialize
public void initialize() throws Exception
Description copied from class:ThreadSafeComponentManager
Properly initialize of the Child handlers.- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classThreadSafeComponentManager<Object>
- Throws:
Exception
-
hasComponent
public boolean hasComponent(String role)
- Specified by:
hasComponent
in interfaceComponentManager
-
lookup
public Component lookup(String role) throws ComponentException
Description copied from class:ThreadSafeComponentManager
Return an instance of a component based on a Role. The Role is usually the Interface Fully Qualified Name(FQN).- Specified by:
lookup
in interfaceComponentManager
- Overrides:
lookup
in classThreadSafeComponentManager<Object>
- Parameters:
role
- The key name of theComponent
to retrieve.- Returns:
- the desired component or null if no component exist for the given role
- Throws:
ComponentException
- if an error occurs
-
release
public void release(Component object)
- Specified by:
release
in 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.
-
-