Elf Documentation
Overview
Elf is a robust container designed to support scriptable applicatations.
Elf Core Goals
- Robust
- Must not fail unexpectedly
- Must not fail silently
- Must be able to determine cause of failure
- Monitorable
- Must report status information to listeners
- Should report debug information to listeners
- Should report progress information to listeners
- Should standardize logging across scripting implementations
- Extensible
- Should allow for user extensions to core functionality without recompilation
- Steerable
- Must be cancellable
Elf Core Functionality
Authentication Management
Individual sub-component may need to authenticate to services. The AuthenticationManager should provide an extensible mechanism for managing authentication tokens.
Event Management
Events (currently Progress, Status, and Debug Events) should have a centralized handling mechanism. Sub-components should have a means of adding listeners for specific types of events and should have a standardized way to create and send events.
Identity Management
Components should be able to create an identity for their sub-components. The mechanism for determining the identity will be extensible.
Elf Container
Elf should support multiple types of containers.
Elf Core Components
ElfRuntime
This class is instantiated and started by the Eclipse platform. It is responsible for instantiation, management of lifetime (configure, initialize, run), and management of status (calling Bootstrap.alive(), Bootstrap.failed(), Bootstrap.success()) of the Bootstrap object.
This object should not throw any exceptions, and should handle failures cleanly by returning the appropriate exit code.
Bootstrap
The Bootstrap class is responsible for parsing the command line arguments, the set up of the runtime environment, and the instantiation and management of the Container. The configuration of this class should work with little mandatory configuration and should fail cleanly if the Container is missing or invalid.
ElfPlatform
ElfPlatform is the globally accessible point of access to Elf-wide objects. The various managers (Authentication, Event, and Identity) are instantiated and configured by this class from a file determined by a command line argument "-bootstrap.properties <value>". The platform should provide default managers if nothing specific is requested.
Elf Runtime Environment
Elf should provide a standard environment for running scriptable applications. The platform should provide a means of accessing these variables.
This environment consists of the following:
- bootstrap.home – The directory in which the Bootstrap code will run.
- The default location is defined by the system property "user.dir"
- This can be overridden by a command line argument of the form "-bootstrapHome <value>"
- container.path – The location of the Container script.
- The default location is a file named "elf-container.xml" in the current working directory.
- This can be overridden by a command line argument of the form "-container <value>"
Elf Platform Initialization
The ElfPlatform handles the instantiation and initialization of the components that are available Elf-wide.
Bootstrap Properties File
The bootstrap properties file is a standard properties file.
# SECTION ONE name=value name2=value # SECTION TWO name3=value
EventManager
This class is extensible by means of adding and removing listeners for certain types of events.