public interface ExecContextFactory
ExecContext.
The factory design pattern is used here to allow various ExecContext implementations, although it is expected that in most cases DefaultExecContextFactory from dragom-core will be adequate.
To provide a high degree of flexibility, initialization Properties are passed to the getExecContext method. The caller (the initialization code of a tool) is free to provide Properties as required, enabling the passing of initialization data from outside to the ExecContext creation process.
A typical strategy is to provide a cascade of Properties initialized from various sources, such as a Properties file in the classpath, system Properties and user properties specified at tool invocation time. Such a strategy is implemented by Util.setupExecContext from dragom-core which many tools use. But ExecContextFactory implementations should not care about such a strategy. They should simply read properties from the provided initialization Properties.
In most cases ExecContext support the workspace directory concept.
To indicate that the ExecContext's implemented by an ExecContextFactory
implementation support the workspace directory concept it should implement
WorkspaceExecContextFactory, on top of ExecContextFactory. Similarly,
the corresponding ExecContext's should implement WorkspaceExecContext.
| Modifier and Type | Method and Description |
|---|---|
ExecContext |
getExecContext(Properties propertiesInit)
Returns an
ExecContext. |
ExecContext getExecContext(Properties propertiesInit)
ExecContext.propertiesInit - Initialization properties.Copyright © 2015–2017 AZYVA INC.. All rights reserved.