The Carbon Java Framework  

The Carbon Core Component Subsytem

Carbon Core Component Subsystem

Printer Friendly Version


Carbon components are lightweight object built and managed by the Carbon container. They are useful for places where singletons would have been used in the past and provide a rich set of advantages over that pattern. The goals of the component service are to provide the following abilities:

  • Configurable - Each component requires a base amount of configuration, but the configuration can be extended to encompass configuration attributes specific to the functionality of the service implemented. This configuration is then available to the component implementation so that it can behave appropriately.
  • Loosely-coupled - Components depend on each others' service interfaces only. Implementations of service interfaces may vary. Further, components gain references to each other via configuration, facilitating quick application assembly.
  • Manageable - The lifecycle of components can be managed programmatically or via JMX. Components can be reconfigured dynamically.
  • Extendable - In addition to the expendability that a component developer may build into their implementation, components are inherently extendable via decorators and interceptors. Decorators have the ability to functionality to a component's interface (e.g. lifecycle methods) and interceptors can perform functionality during the execution of a method invocation (e.g. timing service executions).

This image provides a high-level view of the elements of a component.

Copyright © 2001-2003, Sapient Corporation