DPML
DPML Metro Deployment Solutions
HomeUtilitiesStationMetroDepotTransit
Models

Within the Metro system there is a distinct separation between the model of a component, the component runtime machinery, and the component implementation. The component model is a remotely accessible object through which the runtime machinery can access configuration information about a component. The runtime machinery basically handles concerns such as assembly, deployment, decommissioning and so forth.

A component model is created using the standard controller.

Controller controller = Controller.STANDARD;
URI uri = new URI( "artifact:part:acme/acme-widget#1.1" );
Model model = controller.createModel( uri );
Component component = controller.createComponent( model );
      

Note that the model returned from the controller is remotable and as such the system handling model configuration may be executing in a different virtual machine to the component runtime. Equally, a component deployment system can register a model with a central management system (as is the case with the Station manager).

The Metro system defines a number of extended model interfaces that allow control of aspects of the component and context model. These interfaces are described below - however, please note that these interfaces are specific to the Metro platform and will not be recognized by generic systems based strictly on the DPML Part API.

ComponentModel

The net.dpml.metro.ComponentModel interface exposes information about a component configuration.

Attributes exposed by the ComponentModel interface:

  • the component name
  • the component implementation classname
  • activation policy
  • lifestyle policy
  • garbage collection policy
  • keys to internal parts
  • access to the component models of internal parts
  • logging category priority assignments
  • the context model
ContextModel

The net.dpml.metro.ContextModel interface exposes information about a context settings - specifically the binding of context keys to context value directives.