org.apache.avalon.composition.model.impl
Class DefaultDependencyModel
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.composition.model.impl.DefaultDependent
org.apache.avalon.composition.model.impl.DefaultDependencyModel
- All Implemented Interfaces:
- DependencyModel, Dependent, LogEnabled
- public class DefaultDependencyModel
- extends DefaultDependent
- implements DependencyModel
Default implementation of the deplendency model.
- Version:
- $Revision: 1.9 $ $Date: 2004/03/17 10:39:10 $
- Author:
- Avalon Development Team
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultDependencyModel
public DefaultDependencyModel(Logger logger,
String partition,
String name,
DependencyDescriptor descriptor,
DependencyDirective directive)
throws ModelException
- Creation of a new dependency model.
- Parameters:
logger
- the logging channelpartition
- the partitionname
- the namedescriptor
- the dependency descriptordirective
- the dependency directive (possibly null)
getDependency
public DependencyDescriptor getDependency()
- Return the dependency descriptor.
- Specified by:
getDependency
in interface DependencyModel
- Returns:
- the descriptor
getPath
public String getPath()
- Return an explicit path to a supplier component.
If a dependency directive has been declared
and the directive contains a source declaration, the value
returned is the result of parsing the source value relative
to the absolute address of the implementing component.
- Specified by:
getPath
in interface DependencyModel
- Returns:
- the explicit path
filter
public ServiceDescriptor[] filter(ServiceDescriptor[] candidates)
- Filter a set of candidate service descriptors and return the
set of acceptable service as a ordered sequence.
- Specified by:
filter
in interface DependencyModel
- Parameters:
candidates
- the set of candidate services for the dependency
matching the supplied key
- Returns:
- the accepted candidates in ranked order
- Throws:
IllegalArgumentException
- if the key is unknown
Copyright © The Apache Software Foundation. All Rights Reserved.