org.apache.felix.scr.impl.config
Class ConfiguredComponentHolder

java.lang.Object
  extended by org.apache.felix.scr.impl.config.ConfiguredComponentHolder
All Implemented Interfaces:
ComponentHolder

public class ConfiguredComponentHolder
extends Object

The ConfiguredComponentHolder class is a ComponentHolder for one or more components instances configured by singleton or factory configuration objects received from the Configuration Admin service.

This holder is used only for components configured (optionally or required) by the Configuration Admin service. It is not used for components declared as ignoring configuration or if no Configuration Admin service is available.

The holder copes with three situations:


Method Summary
 void configurationDeleted(String pid)
          The configuration with the given pid (service.pid of the configuration object) is deleted.
 void configurationUpdated(String pid, Dictionary props)
          Configures a component with the given configuration.
protected  ImmediateComponentManager createComponentManager()
           
 void disableComponents()
          Disables all components of this holder.
 void disposeComponents(int reason)
          Disposes off all components of this holder.
 void disposed(ImmediateComponentManager component)
          Informs the holder that the component has been disposed as a result of calling the dispose method.
 void enableComponents()
          Enables all components of this holder.
 BundleComponentActivator getActivator()
          Returns the BundleComponentActivator owning this component holder.
 ComponentMetadata getComponentMetadata()
          Returns the ComponentMetadata describing and declaring this component.
protected  String getComponentName()
           
 Component[] getComponents()
          Returns all Component instances held by this holder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

configurationDeleted

public void configurationDeleted(String pid)
The configuration with the given pid (service.pid of the configuration object) is deleted.

The following situations are supported:

Parameters:
pid - The PID of the deleted configuration

configurationUpdated

public void configurationUpdated(String pid,
                                 Dictionary props)
Configures a component with the given configuration. This configuration update may happen in various situations:

Parameters:
pid - The PID of the configuration used to configure the component

getComponents

public Component[] getComponents()
Description copied from interface: ComponentHolder
Returns all Component instances held by this holder.


enableComponents

public void enableComponents()
Description copied from interface: ComponentHolder
Enables all components of this holder.


disableComponents

public void disableComponents()
Description copied from interface: ComponentHolder
Disables all components of this holder.


disposeComponents

public void disposeComponents(int reason)
Description copied from interface: ComponentHolder
Disposes off all components of this holder.


disposed

public void disposed(ImmediateComponentManager component)
Description copied from interface: ComponentHolder
Informs the holder that the component has been disposed as a result of calling the dispose method.


createComponentManager

protected ImmediateComponentManager createComponentManager()

getActivator

public final BundleComponentActivator getActivator()
Description copied from interface: ComponentHolder
Returns the BundleComponentActivator owning this component holder.

Specified by:
getActivator in interface ComponentHolder

getComponentMetadata

public final ComponentMetadata getComponentMetadata()
Description copied from interface: ComponentHolder
Returns the ComponentMetadata describing and declaring this component.

Specified by:
getComponentMetadata in interface ComponentHolder

getComponentName

protected final String getComponentName()


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.