Annotation Interface ConfigBean


@Documented @Retention(CLASS) @Target(TYPE) @Qualifier public @interface ConfigBean
This configured prototype should be acting as a config bean. This means that if appropriate configuration exists (must be a root configured type with a defined prefix), an instance will be created from that configuration. Additional setup is possible to ensure an instance even if not present in config, and to create default (unnamed) instance.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    An instance of this bean will be created if there are no instances discovered by the configuration provider(s) post startup, and will use all default values annotated using ConfiguredOptions from the bean interface methods.
    boolean
    Determines whether there can be more than one bean instance of this type.
    boolean
    There will always be an instance created with defaults, that will not be named.
  • Element Details

    • atLeastOne

      boolean atLeastOne
      An instance of this bean will be created if there are no instances discovered by the configuration provider(s) post startup, and will use all default values annotated using ConfiguredOptions from the bean interface methods.

      The default value is false.

      Returns:
      the default config bean instance using defaults
      Default:
      false
    • repeatable

      boolean repeatable
      Determines whether there can be more than one bean instance of this type.

      If false then only 0..1 behavior will be permissible for active beans in the config registry. If true then > 1 instances will be permitted.

      Note: this attribute is dynamic in nature, and therefore cannot be validated at compile time. All violations found to this policy will be observed during Services activation.

      The default value is false.

      Returns:
      true if repeatable
      Default:
      false
    • wantDefault

      boolean wantDefault
      There will always be an instance created with defaults, that will not be named.

      The default value is false.

      Returns:
      use the default config instance
      Default:
      false