DataBus Documentation

Installation

install the JAR file

  • extract the archive
  • add the databus.jar file to the classpath of your application

use the DataBus

  • use the class de.hendriklipka.databus.DataBus as main class for your programm
  • write your modules (see below)
  • write a XML file containing the description of your databus

configuration

The DataBus is configured from a single XML file (normally called 'config.xml'). The name is given as the first command line argument to the main class. This file also contains the configuration for log4j. For an example, see the file 'examples/config.xml' (this file is taken from an APD prerelease). The configuration file has the following structure:
The main element is called 'config'. It contains the follwoing sub-elements:
  • databus: The DataBus element. For each component added to the bus, it contains a 'component' element. These elements can contain the following attributes:
    • name: the component name. Required, if no class name is given.
    • id the component ID. Required.
    • class: the class name of the component class. Required, if no name is given.
    The component can be loaded either via a class name or a component name. If the class name is given, the component name is determined as the class name without the package name.
    The classpath is search for the component descriptor, which must be in a file called COMPONENT_NAME.xml. This file contains at least the class name to load and the component name.
    The 'component' element can contain sub nodes. They are read by the configuration package, and given to each component as configuration data. The configuration data only contains elements, which cannot contain attributes (if they do, they will be ignored).
  • log4j:configuration: The log4j configuration. See the log4j documentation for more information.

component descriptors

The component descriptors are optional files, which are used to describe each component. They contain name and class of the component, a short description and information about the components configuration.
This data can be used to verify the proper configuration of all DataBus components, and to implement management tools for the DataBus.
Currently, the descriptors are read but not used by the DataBus.