A component part associates a component profile with a supporting controller. The profile provides a description of a deployment state of a component type.
A component directive is a specialized part deployment strategy. As such the component defintion is contained within an enclosing part.
FORMAL XML SPEC IS COMMING
A component part datastructure is maintained as an encoded Part. The datastructure contains the following fields:
- controller implementation artifact uri
- optional properties
- a directive datastructure readable by the controller implementation
Loading of a part occurs as a two-phase process. The first phase involves decoding of the Part independently of a controller. This enables the resolution of the part controller uri and associated properties. If the controller associated with the part is not compatible with the controller executing the request the executing controller will establish the requested controller using underlying plugin machinery and delegate secondary phase loading to the foreign controller.
The default component directive is the net.dpml.metro.data.ComponentDirective class. The ComponentDirective contains information about the component classname (from which the component type can be resolved), a name that identifies the component within the scope of its parent, and a series of directives that deal with component configuration including the assignment of context entry values and/or instructions to a container concerning value fullfillment.
Directive | Description |
---|---|
ComponentDirective | The ComponentDirective class identifies the component via a scoped name. It asserts an activation policy that is used by the runtime during deployment phases. It contains overloaded state enabling customization of type collection and lifestyle policies and aggregates a set of directives dealing with a number of different component configuration concerns. |
ClassLoaderDirective | The ClassLoaderDirective describes a classloader stack composed of a series of classloader categories. Each category references a collection of jar files via artifact references. |
CategoryDirective | Enables the assignment of logging channel priorities and target associations. |
ContextDirective | Contains the binding of entry keys with values directives and/or value resolution instructions that are used by the runtime to ensure clean and complete context fullfillment. |
Parameters | Convinient association of named values pairs that can be used as an immutable component constructor argument. |
Configuration | A simple and easy to use representation of an XML document suitable for supply to a component as a constructor argument. |
A component Ant Task handles the construction of externalized part artifacts based on a combination of component type evaluation and information supplied under task attributes and nested element. Once created as an external artifact the part is network resolvable and may be easily referenced by application handlers or by components as part of a composite component implementation strategy.
Under the currrent implementation part properties are not evaluated. The principal purpose of the properties field is to support a degree of flexibility when dealing with future implementations of the Metro system. As such, users should assume that property names commencing with dpml are reserved for future use by the DPML.