|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigurationDependency
Configuration dependency that can track the availability of a (valid) configuration. To use
it, specify a PID for the configuration. The dependency is always required, because if it is
not, it does not make sense to use the dependency manager. In that scenario, simply register
your component as a ManagedService(Factory)
and handle everything yourself. Also,
only managed services are supported, not factories. There are a couple of things you need to
be aware of when implementing the updated(Dictionary)
method:
ConfigurationException
when you get a configuration
that is invalid. In this case, the dependency will not change: if it was not available, it
will still not be. If it was available, it will remain available and implicitly assume you
keep working with your old configuration.
Field Summary |
---|
Fields inherited from interface org.apache.felix.dm.ComponentDependencyDeclaration |
---|
STATE_AVAILABLE_OPTIONAL, STATE_AVAILABLE_REQUIRED, STATE_NAMES, STATE_UNAVAILABLE_OPTIONAL, STATE_UNAVAILABLE_REQUIRED |
Method Summary | |
---|---|
ConfigurationDependency |
add(PropertyMetaData properties)
Adds a MetaData regarding a given configuration property. |
ConfigurationDependency |
setCallback(String callback)
|
ConfigurationDependency |
setDescription(String description)
A human readable description of the PID this configuration is associated with. |
ConfigurationDependency |
setHeading(String heading)
The label used to display the tab name (or section) where the properties are displayed. |
ConfigurationDependency |
setInstanceBound(boolean isInstanceBound)
|
ConfigurationDependency |
setLocalization(String path)
Points to the basename of the Properties file that can localize the Meta Type informations. |
ConfigurationDependency |
setPid(String pid)
Sets the service.pid of the configuration you are depending on. |
ConfigurationDependency |
setPropagate(boolean propagate)
Sets propagation of the configuration properties to the service properties. |
Methods inherited from interface org.apache.felix.dm.Dependency |
---|
createCopy, getAutoConfigInstance, getAutoConfigName, getAutoConfigType, getProperties, invokeAdded, invokeRemoved, isAutoConfig, isAvailable, isInstanceBound, isPropagated, isRequired |
Methods inherited from interface org.apache.felix.dm.ComponentDependencyDeclaration |
---|
getName, getState, getType |
Method Detail |
---|
ConfigurationDependency setCallback(String callback)
ConfigurationDependency setPid(String pid)
service.pid
of the configuration you are depending on.
ConfigurationDependency setPropagate(boolean propagate)
ConfigurationDependency setHeading(String heading)
ConfigurationDependency setDescription(String description)
ConfigurationDependency setLocalization(String path)
setLocalization("person")
will match person_du_NL.properties in the root bundle directory.
ConfigurationDependency add(PropertyMetaData properties)
ConfigurationDependency setInstanceBound(boolean isInstanceBound)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |