Skip navigation links

Package de.aristaflow.adept2.base.configuration

ADEPT2 provides its own framework for managing components and their configurations.

See: Description

Package de.aristaflow.adept2.base.configuration Description

ADEPT2 provides its own framework for managing components and their configurations.

ADEPT2-components

ADEPT2 components are to a large extent autonomous. This allows them to have their own configuration. Despite their autonomy, ADEPT2-components may or even need to use other components, for instance, a process manager needs a log manager for process execution logs and a data manager for handling data produced and consumed by process steps. The data manager itself also needs a log manager for logging data access. Therefore a flexible configuration for these usage-relations is needed. To relieve the component programmer from this complexity, all of it is handled by registries and configuration managers.

Registries provide component instances as needed by other components. The managed components are also implicitly configured by the registry as specified in the corresponding configuration file. Each registry has its own configuration manager to handle the appropriate configuration files.

Component types and instances

To enhance flexibility, one distinguishes between component types and component instances. A component type is specified by its interface. This may either be a Java class or a interface. Each component type may have arbitrary instances. An instance needs to have at least a class file implementing the interface of the type and a name. All of these is specified in configuration files and interpreted at runtime, resp. boot time.
The configuration of a process manager type and a corresponding instance may look like this:
# declaration of type "ProcessManager"
Components.ProcessManager = de.aristaflow.adept2.core.processmanager.ProcessManager
# declaration of instance "PM1" of type "ProcessManager"
Instances.ProcessManager = PM1
# used implementation for "PM1"
PM1.Implementation = de.aristaflow.adept2.core.processmanager.defaultimplementation.ProcessManager
# used data manager instance for "PM1"
PM1.DataManager = DM1
# plugin-type which "PM1" can use for logging
PM1.PluginType = LogManager

Type and instance configurations

Each instance can have its own configuration. To simplify configurations, a type can have a configuration of its own. This is used as default for the corresponding instances.

Anonymous instance

Additionally, one does not even need to declare instances. There is one instance per component type which always exists. This is called the anonymous instance. It has the same name as the corresponding type.

Name constraints

Component types and instances are identified and configured by their (arbitrary) names. These names have to be unique with respect to a registry.
The names have to be legal URI path names. It is best to only use alphanumeric characters. They must not contain characters relevant for a URI, for instance, '?', ':', '/'.
Component instances have two names: a simple name as declared in the configuration and a hierarchical name which is a path expression containing the component type followed by the simple name, for instance, "/ProcessManager/PM1".

ADEPT2-logging

All ADEPT2-components may use Java-logging for traceability of the internal functions and method calls. This logging is the only component which is not provided and configured in the usual way by a registry. This is because the logging needs to be available before a registry is initialised. Otherwise the registry itself can not log its own initialisation. Therefore logging is set up in the very first configuration file Boot.properties.
Skip navigation links