Component Identity

In order to perform a "lookup" operation and connect components together we need to have a means of selecting them in an unambiguous way. This means each deployed instance of the component object must be distinguishable from any other component, that is visible within the container. So each installed component object must have some sort of unique identifier attached to it, the 'component identifier'.

There are at least two situations when a component identifier is need:

  • component assembler (human) must use it to connect components together (a "wiring process")
  • for dynamic component lookup operations while the application is running.

In Plexus, component identity is defined by the component descriptors and is the same for both situations mentioned above.

At the moment the two attributes of the component descriptor are: role and role-hint.

role attribute is mandatory - every component descriptor must have it, role-hint is used as differentiator between components in situations when more then one component is able to play a given role in component assembly.

The component key is plexus = ( role, role-hint ), if role-hint is not given it is ( role, null )

In the future this may be extended. For example a version attribute of the component descriptor would be used or there may be the possibility of defining aliases for components.