public class ExecContextPluginFactoryHolder extends Object
ExecContextPluginFactory's.
Allows generic tools to be provided by Dragom or other third party that can be integrated as a client tool by providing a way for client tools to easily provide the ExecContextPluginFactory's to use. Tools provided by Dragom make use of this strategy.
Dragom attempts to remain as independent as possible from external frameworks whose use would have impacts on clients, such as Spring. But at the same time Dragom must not prevent the use of such frameworks. This class allows, but does not force, ExecContextFactory's to be set using a dependency injection framework such as Spring.
ExecContextPluginFactoryHolder can also be used by tools without using a dependency injection framework. ExecContextPluginFactory's can simply be set by bootstrapping code before invoking the tool.
The ExecContextPluginFactory's are simply held in a static Map.
As a convenience, if no ExecContextPluginFactory is set for a given
ExecContextPlugin interface, the following strategy is used:
GenericExecContextPluginFactory is used to
wrap the identified ExecContextPlugin implementation class as an
ExecContextPluginFactory. Example:
org.azyva.dragom.DefaultExecContextPluginImpl.org.azyva.dragom.execontext.plugin.WorkspacePlugin=com.acme.MyWorkspaePluginImpl
| Constructor and Description |
|---|
ExecContextPluginFactoryHolder() |
| Modifier and Type | Method and Description |
|---|---|
static <ExecContextPluginClass extends org.azyva.dragom.execcontext.plugin.ExecContextPlugin> |
getExecContextPluginFactory(Class<ExecContextPluginClass> classExecContextPlugin) |
static <ExecContextPluginClass extends org.azyva.dragom.execcontext.plugin.ExecContextPlugin> |
setExecContextPluginFactory(Class<ExecContextPluginClass> classExecContextPlugin,
org.azyva.dragom.execcontext.plugin.ExecContextPluginFactory<ExecContextPluginClass> execContextPluginFactory)
Sets the
ExecContextPluginFactory for a given ExecContextPlugin
interface. |
public static <ExecContextPluginClass extends org.azyva.dragom.execcontext.plugin.ExecContextPlugin> void setExecContextPluginFactory(Class<ExecContextPluginClass> classExecContextPlugin, org.azyva.dragom.execcontext.plugin.ExecContextPluginFactory<ExecContextPluginClass> execContextPluginFactory)
ExecContextPluginFactory for a given ExecContextPlugin
interface.ExecContextPluginClass - ExecContextPlugin interface class.classExecContextPlugin - Class of the ExecContextPlugin interface.execContextPluginFactory - ExecContextPluginFactory.public static <ExecContextPluginClass extends org.azyva.dragom.execcontext.plugin.ExecContextPlugin> org.azyva.dragom.execcontext.plugin.ExecContextPluginFactory<ExecContextPluginClass> getExecContextPluginFactory(Class<ExecContextPluginClass> classExecContextPlugin)
Copyright © 2015–2016 AZYVA INC.. All rights reserved.