T
- the type of the managed extensionspublic abstract class AbstractComponentExtensionPoint<T> extends AbstractLogEnabled implements ExtensionPoint<T>, Component, ThreadSafe, Serviceable, Contextualizable, Initializable, Disposable
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractComponentExtensionPoint.ExtensionConfiguration
This class is a storage for an extension informations
|
Modifier and Type | Field and Description |
---|---|
protected Context |
_context
Avalon context
|
protected Map<String,AbstractComponentExtensionPoint.ExtensionConfiguration> |
_extensions
Extensions id and configuration associated
|
protected ServiceManager |
_manager
Avalon service manager
|
Constructor and Description |
---|
AbstractComponentExtensionPoint() |
Modifier and Type | Method and Description |
---|---|
void |
addExtension(String id,
String pluginName,
String featureName,
Configuration configuration)
Add an extension to this point.
|
void |
contextualize(Context context) |
void |
dispose() |
T |
getExtension(String id)
Returns the named extension
|
Set<String> |
getExtensionsIds()
Returns a Set containing the ids of all known extensions
|
boolean |
hasExtension(String id)
Returns true if the named extension exists
|
void |
initialize() |
void |
initializeExtensions()
Finalize the initialization of the extensions.
This method is called after all addExtension() calls.This is the last step before the actual startup of the application. |
void |
service(ServiceManager manager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected ServiceManager _manager
protected Map<String,AbstractComponentExtensionPoint.ExtensionConfiguration> _extensions
public AbstractComponentExtensionPoint()
public void contextualize(Context context) throws ContextException
contextualize
in interface Contextualizable
ContextException
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void dispose()
dispose
in interface Disposable
public void addExtension(String id, String pluginName, String featureName, Configuration configuration) throws ConfigurationException
ExtensionPoint
addExtension
in interface ExtensionPoint<T>
id
- the unique identifier of the extension.pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)configuration
- the information about the extension to be addedConfigurationException
- when a configuration problem occurspublic T getExtension(String id)
ExtensionPoint
getExtension
in interface ExtensionPoint<T>
id
- the unique id of the extensionpublic Set<String> getExtensionsIds()
ExtensionPoint
getExtensionsIds
in interface ExtensionPoint<T>
public boolean hasExtension(String id)
ExtensionPoint
hasExtension
in interface ExtensionPoint<T>
id
- the unique id of the extensionpublic void initializeExtensions() throws Exception
ExtensionPoint
addExtension()
calls.initializeExtensions
in interface ExtensionPoint<T>
Exception
- if something wrong occurs