org.codehaus.plexus
public interface PlexusContainer
Field Summary | |
---|---|
String | ROLE |
Method Summary | |
---|---|
void | addComponent(Object component, String role) |
void | addComponentDescriptor(ComponentDescriptor componentDescriptor)
Adds a component descriptor to this container. componentDescriptor should have realmId set. |
void | addContextValue(Object key, Object value)
Add a key/value pair to this container's Context. |
void | addJarRepository(File repository)
Adds a directory of jar resources. |
void | addJarResource(File resource)
Adds a jar to this container's ClassRealm - whose components are then discovered (via the various registered
ComponentDiscoverer's). |
PlexusContainer | createChildContainer(String name, Set urls) |
PlexusContainer | createChildContainer(String name, ClassRealm realm) |
ClassRealm | createComponentRealm(String id, List jars)
Creates and returns a new class realm under this container's realm for the given list of jars. |
void | dispose()
Disposes of this container, which in turn disposes all of it's components. |
PlexusContainer | getChildContainer(String name)
Returns a child container with the unique name. |
ComponentDescriptor | getComponentDescriptor(String role)
Returns the ComponentDescriptor with the given component role and the default role hint.
|
ComponentDescriptor | getComponentDescriptor(String role, String roleHint)
Returns the ComponentDescriptor with the given component role and hint.
|
ComponentDescriptor | getComponentDescriptor(String role, ClassRealm realm)
Returns the ComponentDescriptor with the given component role and the default role hint.
|
ComponentDescriptor | getComponentDescriptor(String role, String roleHint, ClassRealm realm)
Returns the ComponentDescriptor with the given component role and hint.
|
List | getComponentDescriptorList(String role)
Returns a List of ComponentDescriptors with the given role. |
List | getComponentDescriptorList(String role, ClassRealm componentRealm)
Returns a List of ComponentDescriptors with the given role. |
Map | getComponentDescriptorMap(String role)
Returns a Map of ComponentDescriptors with the given role, keyed by role-hint. |
Map | getComponentDescriptorMap(String role, ClassRealm componentRealm)
Returns a Map of ComponentDescriptors with the given role, keyed by role-hint. |
ClassRealm | getComponentRealm(String realmId) |
ClassRealm | getContainerRealm()
Returns the Classworld's ClassRealm of this Container, which acts as the default parent for all contained
components. |
Context | getContext()
Returns this container's context. |
Date | getCreationDate()
Returns the date this container was created. |
Logger | getLogger() |
LoggerManager | getLoggerManager() |
ClassRealm | getLookupRealm()
Returns the lookup realm for this container, which is either
the container realm or the realm set by {@see MutablePlexusContainer#setLookupRealm(ClassRealm)}. |
ClassRealm | getLookupRealm(Object component)
XXX ideally i'd like to place this in a plexus container specific utility class.
|
String | getName()
Returns the unique name of this container in the container hierarchy. |
boolean | hasChildContainer(String name)
Returns true if this container has a child with the given name. |
boolean | hasComponent(String role)
Returns true if this container has the keyed component. |
boolean | hasComponent(String role, String roleHint)
Returns true if this container has a component with the given role/role-hint. |
boolean | isReloadingEnabled()
Returns true if a component's metadata may be reloaded, otherwise, it may be loaded only once. |
Object | lookup(String componentKey)
Looks up and returns a component object with the given unique key or role. |
Object | lookup(String componentKey, ClassRealm realm)
Looks up and returns a component object with the given unique key or role. |
Object | lookup(String role, String roleHint)
Looks up and returns a component object with the given unique role/role-hint combination. |
Object | lookup(String role, String roleHint, ClassRealm realm)
Looks up and returns a component object with the given unique role/role-hint combination. |
Object | lookup(Class componentClass)
Looks up and returns a component object with the given unique key or role. |
Object | lookup(Class componentClass, ClassRealm realm)
Looks up and returns a component object with the given unique key or role. |
Object | lookup(Class role, String roleHint)
Looks up and returns a component object with the given unique role/role-hint combination. |
Object | lookup(Class role, String roleHint, ClassRealm realm)
Looks up and returns a component object with the given unique role/role-hint combination. |
List | lookupList(String role)
Looks up and returns a List of component objects with the given role. |
List | lookupList(String role, List roles)
Looks up and returns a List of component objects with the given role. |
List | lookupList(String role, ClassRealm realm)
Looks up and returns a List of component objects with the given role. |
List | lookupList(String role, List roles, ClassRealm realm)
Looks up and returns a List of component objects with the given role. |
List | lookupList(Class role, List roles)
Looks up and returns a List of component objects with the given role. |
List | lookupList(Class role)
Looks up and returns a List of component objects with the given role. |
List | lookupList(Class role, List roles, ClassRealm realm)
Looks up and returns a List of component objects with the given role. |
List | lookupList(Class role, ClassRealm realm)
Looks up and returns a List of component objects with the given role. |
Map | lookupMap(String role, List roles)
Looks up and returns a Map of component objects with the given role, keyed by all available role-hints. |
Map | lookupMap(String role)
Looks up and returns a Map of component objects with the given role, keyed by all available role-hints. |
Map | lookupMap(String role, List roles, ClassRealm realm)
Looks up and returns a Map of component objects with the given role, keyed by all available role-hints. |
Map | lookupMap(String role, ClassRealm realm)
Looks up and returns a Map of component objects with the given role, keyed by all available role-hints. |
Map | lookupMap(Class role, List roles)
Looks up and returns a Map of component objects with the given role, keyed by all available role-hints. |
Map | lookupMap(Class role)
Looks up and returns a Map of component objects with the given role, keyed by all available role-hints. |
Map | lookupMap(Class role, List roles, ClassRealm realm)
Looks up and returns a Map of component objects with the given role, keyed by all available role-hints. |
Map | lookupMap(Class role, ClassRealm realm)
Looks up and returns a Map of component objects with the given role, keyed by all available role-hints. |
void | registerComponentDiscoveryListener(ComponentDiscoveryListener listener)
Adds the listener to this container. |
void | release(Object component)
Releases the component from the container. |
void | releaseAll(Map components)
Releases all Mapped component values from the container. |
void | releaseAll(List components)
Releases all Listed components from the container. |
void | removeChildContainer(String name)
Removes the keyed child from this container. |
void | removeComponentDiscoveryListener(ComponentDiscoveryListener listener)
Removes the listener from this container. |
void | setLoggerManager(LoggerManager loggerManager) |
ClassRealm | setLookupRealm(ClassRealm realm)
Sets the lookup realm to use for lookup calls that don't have a ClassRealm parameter. |
void | setName(String name) |
void | setParentPlexusContainer(PlexusContainer container)
Sets the parent of this container. |
void | setReloadingEnabled(boolean reloadingEnabled)
Sets the ability to reload a component's metadata multiple times. |
Parameters: componentDescriptor
Throws: ComponentRepositoryException
Parameters: key any unique object valid to the Context's implementation value any object valid to the Context's implementation
Parameters: repository a directory containing JAR files
See Also: addJarResource
Parameters: resource a JAR file
Throws: PlexusContainerException
Parameters: id unique key for the ClassRealm jars list of JARs to place in the realm.
Throws: PlexusContainerException
See Also: addJarResource
Parameters: name a key unique amongst this container's children
Returns: the keyed child container
Parameters: role a unique role for the desired component's descriptor
Returns: the ComponentDescriptor with the given component role
Parameters: role a unique role for the desired component's descriptor roleHint a hint showing which implementation should be used
Returns: the ComponentDescriptor with the given component role
Parameters: role a unique role for the desired component's descriptor realm The class realm to search
Returns: the ComponentDescriptor with the given component role
Parameters: role a unique role for the desired component's descriptor roleHint a hint showing which implementation should be used realm The class realm to search
Returns: the ComponentDescriptor with the given component role
Parameters: role a non-unique key for the desired components
Returns: a List of component descriptors
Parameters: role a non-unique key for the desired components
Returns: a List of component descriptors
Parameters: role a non-unique key for the desired components
Returns: a Map of component descriptors keyed by role-hint
Parameters: role a non-unique key for the desired components
Returns: a Map of component descriptors keyed by role-hint
Returns: the ClassRealm of this Container
Returns: this container's context.
Returns: the date this container was created
Deprecated:
Parameters: component
Returns:
Returns: the unique name of this container in the container hierarchy
Parameters: name a key unique amongst this container's children
Returns: true if this container has a child with the given name
Parameters: role
Returns: true if this container has the keyed component
Parameters: role roleHint
Returns: true if this container has a component with the given role/role-hint
Returns: true if a component's metadata may be reloaded
Parameters: componentKey a unique key for the desired component
Returns: a Plexus component object
Parameters: componentKey a unique key for the desired component
Returns: a Plexus component object
Parameters: role a non-unique key for the desired component roleHint a hint for the desired component implementation
Returns: a Plexus component object
Parameters: role a non-unique key for the desired component roleHint a hint for the desired component implementation
Returns: a Plexus component object
Parameters: componentClass a unique key for the desired component
Returns: a Plexus component object
Parameters: componentClass a unique key for the desired component
Returns: a Plexus component object
Parameters: role a non-unique class key for the desired component roleHint a hint for the desired component implementation
Returns: a Plexus component object
Parameters: role a non-unique class key for the desired component roleHint a hint for the desired component implementation
Returns: a Plexus component object
Parameters: role a non-unique key for the desired components
Returns: a List of component objects
Parameters: role a non-unique key for the desired components
Returns: a List of component objects
Parameters: role a non-unique key for the desired components
Returns: a List of component objects
Parameters: role a non-unique key for the desired components
Returns: a List of component objects
Parameters: role a non-unique class key for the desired components
Returns: a List of component objects
Parameters: role a non-unique class key for the desired components
Returns: a List of component objects
Parameters: role a non-unique class key for the desired components
Returns: a List of component objects
Parameters: role a non-unique class key for the desired components
Returns: a List of component objects
Parameters: role a non-unique key for the desired components
Returns: a Map of component objects
Parameters: role a non-unique key for the desired components
Returns: a Map of component objects
Parameters: role a non-unique key for the desired components
Returns: a Map of component objects
Parameters: role a non-unique key for the desired components
Returns: a Map of component objects
Parameters: role a non-unique class key for the desired components
Returns: a Map of component objects
Parameters: role a non-unique class key for the desired components
Returns: a Map of component objects
Parameters: role a non-unique class key for the desired components
Returns: a Map of component objects
Parameters: role a non-unique class key for the desired components
Returns: a Map of component objects
Parameters: listener A listener which responds to differnet ComponentDiscoveryEvents
Parameters: component the plexus component object to release
Throws: ComponentLifecycleException
Parameters: components Map of plexus component objects to release
Throws: ComponentLifecycleException
See Also: PlexusContainer
Parameters: components List of plexus component objects to release
Throws: ComponentLifecycleException
See Also: PlexusContainer
Parameters: name a key unique amongst this container's children
Parameters: listener A listener to remove
Parameters: realm the new realm to use.
Returns: The previous lookup realm. It is adviced to set it back once the old-style lookups have completed.
Parameters: container the parent of this container, null if none
Parameters: reloadingEnabled true is a component may be reloaded