Interface InjectableComponent<R>

All Known Subinterfaces:
CheckRelayCountFilter
All Known Implementing Classes:
HomeFilter

public interface InjectableComponent<R>
  • Method Details

    • inject

      static <R, I extends InjectableComponent<R>> R inject(org.osgi.framework.BundleContext context, Class<I> clazz, InjectableComponentConfig componentConfig) throws Exception
      Tries to get the value from an InjectableComponent and returns it.
      Type Parameters:
      R - the type of the result
      I - the type of the InjectableComponent
      Parameters:
      context - the context to get the service with
      clazz - the Class of the InjectableComponent
      componentConfig - the ComponentConfiguration
      Returns:
      the result or null if the service was not found
      Throws:
      Exception - in service injection error
    • setProperties

      default void setProperties(Map<String,?> properties)
      Sets the properties of the component.
      Parameters:
      properties - the properties map
    • apply

      R apply()
      Creates the result based on the set configuration.
      Returns:
      the result