|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.scr.impl.ComponentRegistry
public class ComponentRegistry
The ComponentRegistry
class acts as the global registry for
components by name and by component ID. As such the component registry also
registers itself as the ScrService
to support access to the
registered components.
Constructor Summary | |
---|---|
protected |
ComponentRegistry(BundleContext context)
|
Method Summary | |
---|---|
ComponentHolder |
createComponentHolder(BundleComponentActivator activator,
ComponentMetadata metadata)
Factory method to issue ComponentHolder instances to manage
components described by the given component metadata . |
void |
dispose()
|
Component |
getComponent(long componentId)
Returns the component whose component.id matches the given componentId or null if no component with the
given id is currently managed. |
ComponentHolder |
getComponentHolder(String name)
Returns the component registered under the given name or null
if no component is registered yet. |
Component[] |
getComponents()
Returns an array of all components managed by this SCR instance. |
Component[] |
getComponents(Bundle bundle)
Reuturns an array of all components managed by this SCR instance on behalf of the given bundle. |
Component[] |
getComponents(String componentName)
Returns the components whose component.name matches the
given componentName or null if no component
with the given name is currently managed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ComponentRegistry(BundleContext context)
Method Detail |
---|
public void dispose()
public Component[] getComponents()
ScrService
null
is returned.
getComponents
in interface ScrService
null
if there are none.public Component[] getComponents(Bundle bundle)
ScrService
null
is returned.
getComponents
in interface ScrService
bundle
- The Bundle
whose components are to be
returned.
null
if the bundle
has none.public Component getComponent(long componentId)
ScrService
componentId
or null
if no component with the
given id is currently managed.
getComponent
in interface ScrService
componentId
- The ID of the component to return
null
if no such
component exists.public Component[] getComponents(String componentName)
ScrService
component.name
matches the
given componentName
or null
if no component
with the given name is currently managed.
If the component name refers to a component factory component or a component configured with multiple factory configurations this method returns multiple component instances.
getComponents
in interface ScrService
componentName
- The name of the component to return
null
if no such
component exists.public final ComponentHolder getComponentHolder(String name)
null
if no component is registered yet.
public ComponentHolder createComponentHolder(BundleComponentActivator activator, ComponentMetadata metadata)
ComponentHolder
instances to manage
components described by the given component metadata
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |