public interface ToolLifeCycleExecContext
ExecContext implementations that need to be aware of
tool life cycle.
During tool initialization, if the ExecContext implements this interface,
startTool(java.util.Properties) should be called. Similarly for endTool() during tool
termination.
This allow the ExecContext to properly honor
ExecContextPlugin desire to be informed of tool life cycle when their
implementation implements ToolLifeCycleExecContextPlugin.
It also allows the tool to pass initialization Properties to the ExecContext, and any class during the execution of the tool to access these properties in a read-only manner.
Note that runtime Properties provided by RuntimePropertiesPlugin can
come from initialization properties, but not all initialization properties are
runtime Properties.
If this interface is not implemented by an ExecContext implementation, the implementation should treat all ExecContextPlugin's as being transient, which can do no harm apart from reduced performance due to not reusing instances when a single JVM is used for multiple tool executions.
This interface, together with ToolLifeCycleExecContextPlugin, allow expressing a relation between ExecContextPlugin's and ExecContext information scope.
| Modifier and Type | Method and Description |
|---|---|
void |
endTool()
Indicates that a tool execution has ended.
|
Set<String> |
getSetToolProperty()
Tool properties are those provided by a tool when calling
startTool(java.util.Properties). |
String |
getToolProperty(String name)
Returns the value of an tool property.
|
void |
startTool(Properties propertiesInit)
Indicates that a tool execution is about to start.
|
void startTool(Properties propertiesInit)
Should be called by tools during initialization when the ExecContext implementation implements this interface.
propertiesInit - Initialization properties specific to the tool.void endTool()
Should be called by tools during termination when the ExecContext implementation implements this interface.
Set<String> getSetToolProperty()
startTool(java.util.Properties).String getToolProperty(String name)
Tool properties are those provided by a tool when calling
startTool(java.util.Properties).
name - Name of the property.Copyright © 2015–2017 AZYVA INC.. All rights reserved.