org.codehaus.plexus.component.collections
Class AbstractComponentCollection

java.lang.Object
  extended by org.codehaus.plexus.component.collections.AbstractComponentCollection
Direct Known Subclasses:
ComponentList, ComponentMap

public abstract class AbstractComponentCollection
extends Object

Author:
Jason van Zyl

Field Summary
protected  PlexusContainer container
          The reference to the PlexusContainer
protected  String hostComponent
          The component that requires this collection of components
protected  Logger logger
          Used to log errors in the component lookup process.
protected  org.codehaus.plexus.classworlds.realm.ClassRealm realm
          The realm we need to lookup in
protected  String role
          The role of the components we are holding in this Collection.
protected  List roleHints
          The role hint of the components we are holding in this Collection.
 
Constructor Summary
AbstractComponentCollection(PlexusContainer container, org.codehaus.plexus.classworlds.realm.ClassRealm realm, String role, List roleHints, String hostComponent)
           
 
Method Summary
protected  boolean checkUpdate()
           
 void clear()
           
protected  Map getComponentDescriptorMap()
           
protected  Map getLookupRealmMap()
           
protected  org.codehaus.plexus.classworlds.realm.ClassRealm[] getLookupRealms()
          Retrieve the set of all ClassRealms with a descendant-or-self relationship to the ClassRealm used to construct this component collection.
protected  Object lookup(String role, String roleHint, org.codehaus.plexus.classworlds.realm.ClassRealm realm)
           
protected abstract  void releaseAllCallback()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

container

protected PlexusContainer container
The reference to the PlexusContainer


role

protected String role
The role of the components we are holding in this Collection.


roleHints

protected List roleHints
The role hint of the components we are holding in this Collection.


realm

protected org.codehaus.plexus.classworlds.realm.ClassRealm realm
The realm we need to lookup in


hostComponent

protected String hostComponent
The component that requires this collection of components


logger

protected Logger logger
Used to log errors in the component lookup process.

Constructor Detail

AbstractComponentCollection

public AbstractComponentCollection(PlexusContainer container,
                                   org.codehaus.plexus.classworlds.realm.ClassRealm realm,
                                   String role,
                                   List roleHints,
                                   String hostComponent)
Method Detail

getLookupRealms

protected org.codehaus.plexus.classworlds.realm.ClassRealm[] getLookupRealms()
Retrieve the set of all ClassRealms with a descendant-or-self relationship to the ClassRealm used to construct this component collection. This set will be used to collect all of the component instances from all realms which are likely to work from this collection.


getLookupRealmMap

protected Map getLookupRealmMap()

getComponentDescriptorMap

protected Map getComponentDescriptorMap()

checkUpdate

protected boolean checkUpdate()

lookup

protected Object lookup(String role,
                        String roleHint,
                        org.codehaus.plexus.classworlds.realm.ClassRealm realm)

clear

public void clear()

releaseAllCallback

protected abstract void releaseAllCallback()


Copyright © 2001-2008 Codehaus. All Rights Reserved.