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 ClassesModifier and TypeInterfaceDescriptionstatic enumDeprecated, 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 TypeMethodDescription<T> ActivationResultactivateInject(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 intoPhase.ACTIVE.<T> ActivationResultdeactivate(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 intoPhase.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 intoPhase.ACTIVE.- Type Parameters:
T- the managed service type- Parameters:
serviceOrServiceProvider- the target instance or service provider being activated and injectedopts- 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 intoPhase.DESTROYED. If a managed service has aPreDestroyannotated 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 managedopts- the injector options- Returns:
- the result of the deactivation
- Throws:
InjectionServiceProviderException- if a problem occurs- See Also:
-