org.apache.felix.scr
Interface ScrService

All Known Implementing Classes:
ComponentRegistry

public interface ScrService

The ScrService represents the Declarative Services main controller also known as the Service Component Runtime or SCR for short. It provides access to the components managed the SCR.


Method Summary
 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.
 Component[] getComponents()
          Returns an array of all components managed by this SCR instance.
 Component[] getComponents(org.osgi.framework.Bundle bundle)
          Reuturns an array of all components managed by this SCR instance on behalf of the given bundle.
 

Method Detail

getComponents

Component[] getComponents()
Returns an array of all components managed by this SCR instance. The components are returned in ascending order of their component.id. If there are no components currently managed by the SCR, null is returned.

Returns:
The components or null if there are none.

getComponent

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.

Parameters:
componentId - The ID of the component to return
Returns:
The indicated component or null if no such component exists.

getComponents

Component[] getComponents(org.osgi.framework.Bundle bundle)
Reuturns an array of all components managed by this SCR instance on behalf of the given bundle. The components are returned in ascending order of their component.id. If there are no components managed by the SCR for the given bundle, null is returned.

Parameters:
bundle - The Bundle whose components are to be returned.
Returns:
The bundle's components or null if the bundle has none.