This interface identifies classes that can be used as
Components
by a
Composable
.
The contract surrounding the Component
is that it is used, but not a user. When a class implements this interface, it is stating that other entities may use that class.
A Component
is the basic building block of the Avalon Framework. When a class implements this interface, it allows itself to be managed by a ComponentManager
and used by an outside element called a Composable
. The Composable
must know what type of Component
it is accessing, so it will re-cast the Component
into the type it needs.
In order for a Component
to be useful you must either extend this interface, or implement this interface in conjunction with one that actually has methods. The new interface is the contract with the Composable
that this is a particular type of component, and as such it can perform those functions on that type of component.
For example, we want a component that performs a logging function so we extend the Component
to be a LoggingComponent
.
interface LoggingComponent extends Component { log(String message); }
Now all Composable
s that want to use this type of component, will re-cast the Component
into a LoggingComponent
and the Composable
will be able to use the log
method.
Deprecated: Deprecated without replacement. Should only be used while migrating away from a system based on Composable/ComponentManager. A generic java.lang.Object
can be used as a replacement.
@author
Avalon Development Team
@version CVS $Revision: 1.16 $ $Date: 2004/02/11 14:34:24 $