Interface InjectionServicesConfig

All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
InjectionServicesConfig.BuilderBase.InjectionServicesConfigImpl

public interface InjectionServicesConfig extends Prototype.Api
This is the configuration that the Injection service provider uses internally.

If left as-is a default configuration instance will be used with default values provided herein. Callers can optionally configure values by providing a BootstrapBlueprint.config() prior to Injection startup. The configuration provided will be used, and tunable configuration must be located under the key inject within the provided configuration element.

See Also:
  • Method Details

    • builder

      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static InjectionServicesConfig create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • create

      static InjectionServicesConfig create()
      Create a new instance with default values.
      Returns:
      a new instance
    • providerName

      Optional<String> providerName()
      The provider implementation name.
      Returns:
      the provider implementation name
    • providerVersion

      Optional<String> providerVersion()
      The provider implementation version.
      Returns:
      the provider implementation version
    • activationDeadlockDetectionTimeout

      Duration activationDeadlockDetectionTimeout()
      The deadlock detection timeout in millis.
      Returns:
      the deadlock detection timeout
    • shutdownTimeout

      Duration shutdownTimeout()
      Shutdown timeout.
      Returns:
      shutdown timeout
    • activationLogs

      boolean activationLogs()
      Flag indicating whether activation logs are captured, recorded, and retained.
      Returns:
      the flag indicating whether activation logs are captured and retained
    • serviceLookupCaching

      boolean serviceLookupCaching()
      Flag indicating whether service lookups (i.e., via Services.lookup(java.lang.Class<T>)) are cached.
      Returns:
      the flag indicating whether service lookups are cached
    • permitsDynamic

      boolean permitsDynamic()
      Flag indicating whether the services registry permits dynamic behavior. The default implementation of Injection supports dynamic (see supportsDynamic()), but does not permit it by default.
      Returns:
      the flag indicating whether the services registry supports dynamic updates of the service registry
    • supportsDynamic

      boolean supportsDynamic()
      Flag indicating whether the services registry supports dynamic behavior. Note that if the provider does not support this flag then permitting it via permitsDynamic() will have no affect. The default implementation of Injection supports dynamic, but does not permit it by default.
      Returns:
      the flag indicating whether the services registry supports dynamic updates of the service registry post startup
    • permitsReflection

      boolean permitsReflection()
      Flag indicating whether reflection is permitted. The default implementation of Injection supports reflection at compile-time only, and is not controlled by this flag directly.
      Returns:
      the flag indicating whether the provider is permitted to use reflection for normal runtime usage
    • supportsReflection

      boolean supportsReflection()
      Flag indicating whether the reflection is supported. Note that if the provider does not support this flag then permitting it via permitsReflection() will have no affect. The default implementation of Injection supports reflection only during compile-time operations using the Injection maven-plugin.
      Returns:
      the flag indicating whether reflection is supported during runtime operations
    • usesCompileTimeApplications

      boolean usesCompileTimeApplications()
      Flag indicating whether compile-time generated Application's should be used at Injection's startup initialization. Setting this value to false will have no affect if the underlying provider does not support compile-time generation via supportsCompileTime().
      Returns:
      the flag indicating whether the provider is permitted to use Application generated code from compile-time
      See Also:
    • usesCompileTimeModules

      boolean usesCompileTimeModules()
      Flag indicating whether compile-time generated ModuleComponent's should be used at Injection's startup initialization. Setting this value to false will have no affect if the underlying provider does not support compile-time generation via supportsCompileTime().
      Returns:
      the flag indicating whether the provider is permitted to use Application generated code from compile-time
      See Also:
    • supportsCompileTime

      boolean supportsCompileTime()
      Flag indicating whether the dependency injection model for the Application and Activator is capable for being produced at compile-time, and therefore used/loaded during runtime operations.
      Returns:
      the flag indicating whether the provider supports compile-time code generation of DI artifacts
    • usesJsr330

      boolean usesJsr330()
      Flag indicating whether jsr330 specification will be used and enforced.
      Returns:
      the flag indicating whether strict jsr330 specification will be enforced
    • supportsJsr330

      boolean supportsJsr330()
      Flag indicating whether jsr330 is supported by the provider implementation.
      Returns:
      the flag indicating whether the provider supports the jsr330 specification
    • supportsJsr330Statics

      boolean supportsJsr330Statics()
      Flag indicating whether jsr330 is supported by the provider implementation for the use on static injection points.
      Returns:
      the flag indicating whether the provider supports the jsr330 specification for the use of static injection points
    • supportsJsr330Privates

      boolean supportsJsr330Privates()
      Flag indicating whether jsr330 is supported by the provider implementation for the use on private injection points.
      Returns:
      the flag indicating whether the provider supports the jsr330 specification for the use of private injection points
    • supportsContextualLookup

      boolean supportsContextualLookup()
      Flag indicating whether contextual lookup is supported via Services.contextualServices(InjectionPointInfo).
      Returns:
      the flag indicating whether the provider supports contextual lookup
    • debug

      Optional<Boolean> debug()
      Whether debug is enabled. Defaults to false, can be overridden using system property InjectionServices.TAG_DEBUG.
      Returns:
      if debug should be enabled
    • shouldDebug

      default boolean shouldDebug()
      Uses configured debug(), or attempts to discover if debug should be used if not configured.
      Returns:
      whether to debug