public interface ComponentHolder<S>
ComponentHolder
interface provides the API for supporting
component instances configured through either singleton configurations (or
no configuration at all) and factory configurations.
Instances of this interface are managed by the RegionConfigurationSupport
class on behalf of the
BundleComponentActivator
and the
ComponentRegistry
.
Modifier and Type | Method and Description |
---|---|
void |
configurationDeleted(TargetedPID pid,
TargetedPID factoryPid)
The configuration with the given PID has been deleted from the
Configuration Admin service.
|
boolean |
configurationUpdated(TargetedPID targetedPid,
TargetedPID factoryTargetedPid,
java.util.Dictionary<java.lang.String,java.lang.Object> props,
long changeCount)
Configure a component with configuration from the given PID.
|
org.osgi.util.promise.Promise<java.lang.Void> |
disableComponents(boolean async)
Disables all components of this holder.
|
void |
disposeComponents(int reason)
Disposes off all components of this holder.
|
org.osgi.util.promise.Promise<java.lang.Void> |
enableComponents(boolean async)
Enables all components of this holder and if satisfied activates
them.
|
ComponentActivator |
getActivator()
Returns the
ComponentActivator owning this component
holder. |
ComponentMetadata |
getComponentMetadata()
Returns the
ComponentMetadata describing and declaring this
component. |
java.util.List<? extends ComponentManager<?>> |
getComponents()
Returns all
Component instances held by this holder. |
TargetedPID |
getConfigurationTargetedPID(TargetedPID pid,
TargetedPID factoryPid)
Returns the targeted PID used to configure this component
|
boolean |
isEnabled()
whether the component is currently enabled
|
ComponentActivator getActivator()
ComponentActivator
owning this component
holder. (overlaps ComponentContaienr)ComponentMetadata getComponentMetadata()
ComponentMetadata
describing and declaring this
component. (overlaps ComponentContaienr)void configurationDeleted(TargetedPID pid, TargetedPID factoryPid)
pid
- The PID of the deleted configurationfactoryPid
- The factory PID of the deleted configurationboolean configurationUpdated(TargetedPID targetedPid, TargetedPID factoryTargetedPid, java.util.Dictionary<java.lang.String,java.lang.Object> props, long changeCount)
targetedPid
- Targeted PID for the configurationfactoryTargetedPid
- the (targeted) factory pid or null for a singleton pidprops
- the property dictionary from the configuration.changeCount
- change count of the configuration, or R4 imitation.TargetedPID getConfigurationTargetedPID(TargetedPID pid, TargetedPID factoryPid)
pid
- a targetedPID containing the service pid for the component desired (the rest of the targeted pid is ignored)factoryPid
- a targetedPID containing the factory pid for the component desired.java.util.List<? extends ComponentManager<?>> getComponents()
Component
instances held by this holder.org.osgi.util.promise.Promise<java.lang.Void> enableComponents(boolean async)
async
- Whether the actual activation should take place
asynchronously or not.org.osgi.util.promise.Promise<java.lang.Void> disableComponents(boolean async)
async
- Whether the actual deactivation should take place
asynchronously or not.boolean isEnabled()
void disposeComponents(int reason)
reason
-