Interface Injector


@Deprecated(forRemoval=true, since="4.0.8") public interface Injector
Deprecated, for removal: This API element is subject to removal in a future version.
Helidon inject is deprecated and will be replaced in a future version
Used to perform programmatic activation and injection.

Note that the reference implementation of Injection only performs non-reflective, compile-time generation of service activators for services that it manages. This Injector contract is mainly provided in order to allow other library extension implementations to extend the model to perform other types of injection point resolution.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Deprecated, for removal: This API element is subject to removal in a future version.
    The strategy the injector should attempt to apply.
  • Method Summary

    Modifier and Type
    Method
    Description
    activateInject(T serviceOrServiceProvider, InjectorOptions opts)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Called to activate and inject a manage service instance or service provider, putting it into Phase.ACTIVE.
    deactivate(T serviceOrServiceProvider, InjectorOptions opts)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Called to deactivate a managed service or service provider, putting it into Phase.DESTROYED.
  • Method Details

    • activateInject

      <T> ActivationResult activateInject(T serviceOrServiceProvider, InjectorOptions opts) throws InjectionServiceProviderException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Called to activate and inject a manage service instance or service provider, putting it into Phase.ACTIVE.
      Type Parameters:
      T - the managed service type
      Parameters:
      serviceOrServiceProvider - the target instance or service provider being activated and injected
      opts - the injector options
      Returns:
      the result of the activation
      Throws:
      InjectionServiceProviderException - if an injection or activation problem occurs
      See Also:
    • deactivate

      <T> ActivationResult deactivate(T serviceOrServiceProvider, InjectorOptions opts) throws InjectionServiceProviderException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Called to deactivate a managed service or service provider, putting it into Phase.DESTROYED. If a managed service has a PreDestroy annotated method then it will be called during this lifecycle event.
      Type Parameters:
      T - the managed service type
      Parameters:
      serviceOrServiceProvider - the service provider or instance registered and being managed
      opts - the injector options
      Returns:
      the result of the deactivation
      Throws:
      InjectionServiceProviderException - if a problem occurs
      See Also: