public class ExecContextFactoryHolder extends Object
ExecContextFactory.
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 ExecContextFactory 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, the ExecContextFactory to be set using a dependency injection framework such as Spring.
ExecContextFactoryHolder can also be used by tools without using a dependency injection framework. The ExecContextFactory can simply be set by bootstrapping code before invoking the tool.
The ExecContextFactory is simply held in a static variable.
As a convenience, if no ExecContextFactory is set, the class identified by the
org.azyva.dragom.DefaultExecContextFactory system property is used or
DefaultExecContextFactory if not specified.
Util.applyDragomSystemProperties() is called during initialization of this
class.
| Constructor and Description |
|---|
ExecContextFactoryHolder() |
| Modifier and Type | Method and Description |
|---|---|
static org.azyva.dragom.execcontext.ExecContextFactory |
getExecContextFactory() |
static void |
setExecContextFactory(org.azyva.dragom.execcontext.ExecContextFactory execContextFactory)
Sets the
ExecContextFactory. |
public static void setExecContextFactory(org.azyva.dragom.execcontext.ExecContextFactory execContextFactory)
ExecContextFactory.execContextFactory - See description.public static org.azyva.dragom.execcontext.ExecContextFactory getExecContextFactory()
ExecContextFactory set with setExecContextFactory(org.azyva.dragom.execcontext.ExecContextFactory) or
the default ExecContextFactory if none has been set.Copyright © 2015–2016 AZYVA INC.. All rights reserved.