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 Type
    Method
    Description
    Returns 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.
    boolean
    Returns true if auto configuration is enabled for this dependency.
    boolean
    Returns true if the dependency is available.
    boolean
    Determines if the properties associated with this dependency should be propagated to the properties of the service registered by the component they belong to.
    boolean
    Returns true if this a required dependency.
    default boolean
    Determines if the propagated dependency properties must override the component service properties.
  • Method Details

    • isRequired

      boolean isRequired()
      Returns true if this a required dependency. Required dependencies are dependencies that must be available before the component can be activated.
      Returns:
      true if the dependency is required
    • isAvailable

      boolean isAvailable()
      Returns true if the dependency is available.
      Returns:
      true if the dependency is available
    • isAutoConfig

      boolean isAutoConfig()
      Returns true if 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:
      true if 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

      <K, V> Dictionary<K,V> getProperties()
      Returns the properties associated with this dependency.
      Returns:
      the properties
      See Also: