org.apache.felix.scr

## Interface ScrService

Deprecated.
clients should use `ServiceComponentRuntime` instead.

    @Deprecated
    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

All Methods Instance Methods Abstract Methods Deprecated Methods
`Component` `getComponent(long componentId)` Deprecated. Returns the component whose component.id matches the given `componentId` or `null` if no component with the given id is currently managed.
`Component[]` `getComponents()` Deprecated. Returns an array of all components managed by this SCR instance.
`Component[]` `getComponents(Bundle bundle)` Deprecated. Returns an array of all components managed by this SCR instance on behalf of the given bundle.
`Component[]` `getComponents(String componentName)` Deprecated. Returns the components whose `component.name` matches the given `componentName` or `null` if no component with the given name is currently managed.

### Method Detail

#### getComponents

    Component[] getComponents()

Deprecated.
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)

Deprecated.
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(String componentName)

Deprecated.
Returns the components whose `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.

Parameters:
  `componentName` - The name of the component to return
Returns:
  The indicated components or `null` if no such component exists.
Since:
  1.5 (Apache Felix Declarative Services 1.4.2)

#### getComponents

    Component[] getComponents(Bundle bundle)

Deprecated.
Returns 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.