Package org.apache.felix.dm
Interface Dependency
- All Known Subinterfaces:
BundleDependency,ConfigurationDependency,DependencyContext,ResourceDependency,ServiceDependency
- All Known Implementing Classes:
AbstractDependency
public interface Dependency
Generic dependency for a component.
Can be added to a single component. Can be available, or not..
- Author:
- Felix Project Team
-
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the member in the class of the component instance to inject into.<K,V> Dictionary <K, V> Returns the properties associated with this dependency.booleanReturnstrueif auto configuration is enabled for this dependency.booleanReturnstrueif the dependency is available.booleanDetermines if the properties associated with this dependency should be propagated to the properties of the service registered by the component they belong to.booleanReturnstrueif this a required dependency.default booleanDetermines if the propagated dependency properties must override the component service properties.
-
Method Details
-
isRequired
boolean isRequired()Returnstrueif this a required dependency. Required dependencies are dependencies that must be available before the component can be activated.- Returns:
trueif the dependency is required
-
isAvailable
boolean isAvailable()Returnstrueif the dependency is available.- Returns:
trueif the dependency is available
-
isAutoConfig
boolean isAutoConfig()Returnstrueif auto configuration is enabled for this dependency. Auto configuration means that a dependency is injected in the component instance when it's available, and if it's unavailable, a "null object" will be inserted instead.- Returns:
- true if auto configuration is enabled for this dependency
-
getAutoConfigName
String getAutoConfigName()Returns the name of the member in the class of the component instance to inject into. If you specify this, not all members of the right type will be injected, only the member whose name matches.- Returns:
- the name of the member in the class of the component instance to inject into
-
isPropagated
boolean isPropagated()Determines if the properties associated with this dependency should be propagated to the properties of the service registered by the component they belong to.- Returns:
trueif the properties should be propagated- See Also:
-
overrideServiceProperties
default boolean overrideServiceProperties()Determines if the propagated dependency properties must override the component service properties. By default, propagated service properties don't override the component service properties. It means that a given dependency property does not override the same property in the component service properties.- Returns:
- true if the dependency service properties are propagated and override the component service properties.
-
getProperties
Returns the properties associated with this dependency.- Returns:
- the properties
- See Also:
-