public interface IInstrument extends IFileEnvironment, IClassLoaderSupport, IMessageBundleSupport, IMetaInfoSupport, IAttributeSupport
The platform is designed to be extended via IInstrument objects.
These objects are registered with the IInstrumentRegistry. An
IInstrument may be anything from a static initialization, a
sophisticated handler for special document features, up to a endpoint for web
service call-ins or a scripting engine.
The instrument is a dynamically loadable component that is not known in
advance at development time. The instrument is represented by an
IInstrument instance
The IInstrument itself is loaded by a new classloader instance, so
that the implementation of the instrument need not be referenced in the vm
class path. This class loader tries to load its implementations from the
"classes" and "lib" directories described below.
An instrument is physically represented by a directory structure in the "instruments" directory of the installation. The structure contains the following information:
example:
+-instruments
|
+-instrument1
| |
| +-INSTRUMENT-INF
| | |
| | + instrument.xml
| | |
| | +-lib
| | | |
| | | + ... your libraries
| | |
| | +-classes
| | |
| | + ... your classes
| |
| + ... your files
|
+ ... more instruments
this example defines a single instrument "instrument1" with the home directory "instrument1"
META_ID, META_NAME, META_VENDOR, META_VERSION| Modifier and Type | Method and Description |
|---|---|
void |
addPrerequisite(IInstrument prerequisite,
String absentAction) |
IExtension |
createExtension(String extensionPointId,
String id) |
void |
flush() |
IExtension[] |
getExtensions()
The extensions made by this
IExtensionProvider. |
String |
getId()
A unique name for the instrument.
|
IInstrumentRegistry |
getInstrumentRegistry()
The
IInstrumentRegistry where this IInstrument is
currently registered. |
IInstrumentPrerequisite[] |
getPrerequisites()
The collection of IInstrumentPrerequisite objects that are required to be
available for this one to run.
|
State |
getState() |
void |
registerExtension(IExtension extension)
|
void |
removePrerequisite(IInstrument prerequisite) |
void |
unregisterExtension(IExtension extension)
|
getBaseDir, getProfileDir, getTempDir, getWorkingDirgetClassLoadergetMessageBundlegetMetaInfogetAttribute, removeAttribute, setAttributevoid addPrerequisite(IInstrument prerequisite, String absentAction)
IExtension createExtension(String extensionPointId, String id) throws ObjectCreationException
ObjectCreationExceptionvoid flush()
throws IOException
IOExceptionIExtension[] getExtensions()
IExtensionProvider.IExtensionProvider.String getId()
It is used for identifying uniquely a instrument within the
IInstrumentRegistry. Clients may lookup instruments with well
known names, for example the annotation handling instrument.
By convention this should conform to the standard java notation for class names.
IInstrumentRegistry getInstrumentRegistry()
IInstrumentRegistry where this IInstrument is
currently registered.IInstrumentRegistry where this IInstrument is
currently registered.IInstrumentPrerequisite[] getPrerequisites()
State getState()
void registerExtension(IExtension extension) throws InstrumentRegistryException
extension - InstrumentRegistryExceptionvoid removePrerequisite(IInstrument prerequisite)
void unregisterExtension(IExtension extension) throws InstrumentRegistryException
extension - InstrumentRegistryExceptionCopyright © 2013 intarsys consulting GmbH. All Rights Reserved.