Interface Component

All Known Subinterfaces:
ComponentSelector, DataSourceComponent, ExampleInstrumentable, HashedDataSourceCluster, HelloDBService, IdGenerator, IndexedDataSourceCluster, Monitor, RoundRobinDataSourceCluster, SourceFactory, SourceResolver, Store, StoreJanitor, XSLTProcessor
All Known Implementing Classes:
AbstractFilesystemStore, AbstractIdGenerator, AbstractJispFilesystemStore, AbstractMonitor, AbstractReadWriteStore, CommonsVFSSourceFactory, DefaultComponentSelector, DefaultDOMHandlerFactory, DefaultDOMSerializer, DefaultEntityResolver, DefaultExampleInstrumentable, DefaultHashedDataSourceCluster, DefaultHelloDBService, DefaultIndexedDataSourceCluster, DefaultRoundRobinDataSourceCluster, DefaultXMLizer, ExcaliburComponentSelector, FileSourceFactory, FTPSourceFactory, HTTPClientSourceFactory, InformixDataSource, J2eeDataSource, JaxenProcessorImpl, JaxpParser, JdbcDataSource, JispFilesystemStore, JTidyHTMLParser, MemoryStore, MRUMemoryStore, ResourceLimitingJdbcDataSource, ResourceSourceFactory, Saxon6ProcessorImpl, Saxon7ProcessorImpl, SourceResolverImpl, StoreJanitorImpl, URLSourceFactory, WrapperComponentSelector, XPathProcessorImpl, XSLTProcessorImpl

public interface Component

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 Composables 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.

$Id: 30977 2004-07-30 08:57:54Z niclas $
Avalon Development Team

Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.