Xvcl Pages; [ Cjos Audience]
Summary
A processor factory is available for the following run-time environments.
Therefore, the XVCLProcessorFactory mechanism should select a processor at runtime based upon the run-time environment. The factory class is
gchii.tools.xvcl.XVCLProcessorFactory
Multiple, independent instances of an XVCLProcessor should be supported. See also Xvcl And Static.
JAVA_4 vs. JAVA_5
The XVCLProcessorFactory uses a mechanism (to be determined) to select JAVA_4 or JAVA_5.
- When JAVA_5, a JAVA_5-based processor is preferred. If none exists, try JAVA_4.
- When JAVA_4, find a JAVA_4-based processor. If none exists, display a meaningful error message.
JDOM 1.0 vs. JDOM 1.1
The XVCLProcessorFactory uses a mechanism (to be determined) to select JDOM 1.0 or JDOM 1.1.
- A certain class has been moved from one package to another.
- When a certain class exists, use JDOM 1.1-compatible processor.
- Otherwise, use JDOM 1.0-compatible processor.
Implements the IXVCLProcessor interface
An XVCLProcessor must implement this interface:
edu.xvcl.core.api.IXVCLProcessor
XVCLAntTask
An XVCLAntTask uses the XVCLProcessorFactory to get an instance of IXVCLProcessor.
Plug-in
An XVCLProcessor is a plug-in for the XVCLProcessorFactory. The class name of a specific XVCLProcessor is unknown to the factory.
- The XVCLProcessorFactory, XVCLAntTask and its interfaces are compiled separately.
- An implementation of IXVCLProcessor is identified using the service mechanism.
Service mechanism
An XVCLProcessor implements the IXVCLProcessor interface. Therefore, the class name is stored as a resource in the edu.xvcl.core.api.IXVCLProcessor file under META-INF/service.
If our implementation were gchii.tools.xvcl3a.XVCLProcessor, the resource would be
----- META-INF/service/edu.xvcl.core.api.IXVCLProcessor -----
gchii.tools.xvcl3a.XVCLProcessor
|