Module io.helidon.inject.api
Package io.helidon.inject.api
package io.helidon.inject.api
The Helidon Injection API provide these annotation types that are typically used at compile time
to assign special meaning to the type. It is used in conjunction with Helidon tooling (see the
injection processor
and
injectio maven-plugin
modules) to create and validate the DI module at compile time.
Contract
- signifies that the type can be used for lookup in the service registry.ExternalContracts
- same as Contract, but applied to the implementation class instead.RunLevel
- ascribes meaning for when the service should start.
jakarta.inject
and jakarta.annotation
modules are the
primary way to annotate your DI model types.
Other types from the API are less commonly used, but are still made available for situations where programmatic access is required or desirable in some way. The two most common types for entry into this part of the API are shown below.
InjectionServices
- suite of services that are typically delivered by the Injection provider.Services
- the services registry, which is one such service from this suite.
-
ClassDescriptionTracks the transformations of
ServiceProvider
'sActivationStatus
in lifecycle activity (i.e., activation startup and deactivation shutdown).Provide a means to query the activation log.A receiver of events from theServices
registry and providers held by the service registry.The activation status.Activators are responsible for lifecycle creation and lazy activation of service providers.An Application instance, if available at runtime, will be expected to provide a blueprint for all service provider's injection points.Factory for creatingCallingContext
and builders for the calling context.This annotation is effectively the same asNamed
where theNamed.value()
is aClass
name instead of aString
.Commonly usedQualifier
types.TheContract
annotation is used to relay significance to the type that it annotates.DeActivators are responsible for lifecycle, transitioning aServiceProvider
through itsPhase
's, notably including anyPreDestroy
method invocations, and finally into the terminalPhase.DESTROYED
phase.Comparator appropriate forDependencyInfo
.The kind of injection target.A lifecycle activation event.Placed on the implementation of a service as an alternative to using aContract
.Deprecated.this type may have backward incompatible changes, as it is considered a preview feature of Helidon!A general exception indicating that something failed related to Injection.Provides ability to contextualize the injected service by the target receiver of the injection point dynamically at runtime.An exception relative to aServiceProvider
.Abstract factory for all services provided by a single Helidon Injection provider implementation.The holder for the globally activeInjectionServices
singleton instance, as well as its associatedBootstrap
primordial configuration.Used to perform programmatic activation and injection.The strategy the injector should attempt to apply.Indicates that type identified byIntercepted.value()
is being intercepted.Meta-annotation for an annotation that will trigger services annotated with it to become intercepted.Implementors of this contract must beNamed
according to theIntercepted
annotation they support.Represents the next in line for interception, terminating with a call to the wrapped service provider.Wraps any checked exceptions that are thrown during theInterceptor
invocations.Provides aggregation of services to the "containing" (jar) module.Provides a means to identify if the instance is optionally named.Forms a progression of full activation and deactivation.Represents thePostConstruct
method.Represents thePreDestroy
method.Utility methods for qualifiers.Implementors of this contract are capable of resetting the state of itself (i.e., clears cache, log entries, etc.).Indicates the desired startup sequence for a service class.Responsible for binding service providers to the service registry.Responsible for registering the injection plan to the services in the service registry.The binder builder for the service plan.Provides management lifecycle around services.An extension toServiceProvider
that allows for startup binding from aInjection$$Application
, and thereby works in conjunction with theServiceBinder
during injection service registry initialization.Represents an injection exception.Instances of these provide lists and maps ofServiceProvider
s.The service registry.Some components may require start when Helidon is bootstrapped, such as WebServer (to open server sockets).