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'sActivationStatusin lifecycle activity (i.e., activation startup and deactivation shutdown).Log entry for lifecycle related events (i.e., activation startup and deactivation shutdown).Fluent API builder forActivationLogEntry.ActivationLogEntry.BuilderBase<BUILDER extends ActivationLogEntry.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ActivationLogEntry> Fluent API builder base forActivationLogEntry.Generated implementation of the prototype, can be extended by descendant prototype implementations.Provide a means to query the activation log.A receiver of events from theServicesregistry and providers held by the service registry.Request to activate a service.Fluent API builder forActivationRequest.ActivationRequest.BuilderBase<BUILDER extends ActivationRequest.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ActivationRequest> Fluent API builder base forActivationRequest.Generated implementation of the prototype, can be extended by descendant prototype implementations.Represents the result of a service activation or deactivation.Fluent API builder forActivationResult.ActivationResult.BuilderBase<BUILDER extends ActivationResult.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ActivationResult> Fluent API builder base forActivationResult.Generated implementation of the prototype, can be extended by descendant prototype implementations.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.This is the bootstrap needed to provide toServicesinitialization.Fluent API builder forBootstrap.Bootstrap.BuilderBase<BUILDER extends Bootstrap.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends Bootstrap> Fluent API builder base forBootstrap.Generated implementation of the prototype, can be extended by descendant prototype implementations.For internal use only to Helidon.Fluent API builder forCallingContext.CallingContext.BuilderBase<BUILDER extends CallingContext.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends CallingContext> Fluent API builder base forCallingContext.Generated implementation of the prototype, can be extended by descendant prototype implementations.Factory for creatingCallingContextand builders for the calling context.This annotation is effectively the same asNamedwhere theNamed.value()is aClassname instead of aString.Commonly usedQualifiertypes.Combines theServiceInfocriteria along with theInjectionPointInfocontext that the query applies to.Fluent API builder forContextualServiceQuery.ContextualServiceQuery.BuilderBase<BUILDER extends ContextualServiceQuery.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ContextualServiceQuery> Fluent API builder base forContextualServiceQuery.Generated implementation of the prototype, can be extended by descendant prototype implementations.TheContractannotation is used to relay significance to the type that it annotates.Request to deactivate aServiceProvider.Fluent API builder forDeActivationRequest.DeActivationRequest.BuilderBase<BUILDER extends DeActivationRequest.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends DeActivationRequest> Fluent API builder base forDeActivationRequest.Generated implementation of the prototype, can be extended by descendant prototype implementations.DeActivators are responsible for lifecycle, transitioning aServiceProviderthrough itsPhase's, notably including anyPreDestroymethod invocations, and finally into the terminalPhase.DESTROYEDphase.Represents a perServiceInfomapping ofDependencyInfo's.Fluent API builder forDependenciesInfo.DependenciesInfo.BuilderBase<BUILDER extends DependenciesInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends DependenciesInfo> Fluent API builder base forDependenciesInfo.Generated implementation of the prototype, can be extended by descendant prototype implementations.Aggregates the set ofInjectionPointInfo's that are dependent upon a specific and commonServiceInfodefinition.Fluent API builder forDependencyInfo.DependencyInfo.BuilderBase<BUILDER extends DependencyInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends DependencyInfo> Fluent API builder base forDependencyInfo.Generated implementation of the prototype, can be extended by descendant prototype implementations.Comparator appropriate forDependencyInfo.Abstractly describes method or field elements of a managed service type (i.e., fields, constructors, injectable methods, etc.).Fluent API builder forElementInfo.ElementInfo.BuilderBase<BUILDER extends ElementInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ElementInfo> Fluent API builder base forElementInfo.Generated implementation of the prototype, can be extended by descendant prototype implementations.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.Describes a receiver for injection - identifies who/what is requesting an injection that needs to be satisfied.Fluent API builder forInjectionPointInfo.InjectionPointInfo.BuilderBase<BUILDER extends InjectionPointInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends InjectionPointInfo> Fluent API builder base forInjectionPointInfo.Generated implementation of the prototype, can be extended by descendant prototype implementations.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.This is the configuration that the Injection service provider uses internally.Fluent API builder forInjectionServicesConfig.InjectionServicesConfig.BuilderBase<BUILDER extends InjectionServicesConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends InjectionServicesConfig> Fluent API builder base forInjectionServicesConfig.Generated implementation of the prototype, can be extended by descendant prototype implementations.The holder for the globally activeInjectionServicessingleton instance, as well as its associatedBootstrapprimordial configuration.Used to perform programmatic activation and injection.The strategy the injector should attempt to apply.Provides optional, contextual tunings to theInjector.Fluent API builder forInjectorOptions.InjectorOptions.BuilderBase<BUILDER extends InjectorOptions.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends InjectorOptions> Fluent API builder base forInjectorOptions.Generated implementation of the prototype, can be extended by descendant prototype implementations.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 beNamedaccording to theInterceptedannotation they support.Represents the next in line for interception, terminating with a call to the wrapped service provider.Internal bootstrap is what we store whenInjectionServices.globalBootstrap(Bootstrap)is used.Fluent API builder forInternalBootstrap.InternalBootstrap.BuilderBase<BUILDER extends InternalBootstrap.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends InternalBootstrap> Fluent API builder base forInternalBootstrap.Generated implementation of the prototype, can be extended by descendant prototype implementations.Used byInterceptor.Fluent API builder forInvocationContext.InvocationContext.BuilderBase<BUILDER extends InvocationContext.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends InvocationContext> Fluent API builder base forInvocationContext.Generated implementation of the prototype, can be extended by descendant prototype implementations.Wraps any checked exceptions that are thrown during theInterceptorinvocations.Metrics.Fluent API builder forMetrics.Metrics.BuilderBase<BUILDER extends Metrics.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends Metrics> Fluent API builder base forMetrics.Generated implementation of the prototype, can be extended by descendant prototype implementations.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 thePostConstructmethod.Represents thePreDestroymethod.Represents a qualifier annotation (a specific case of annotations, annotated withQualifier.Fluent API builder forQualifier.Qualifier.BuilderBase<BUILDER extends Qualifier.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends Qualifier> Fluent API builder base forQualifier.Generated implementation of the prototype, can be extended by descendant prototype implementations.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.Describes a managed service or injection point.Fluent API builder forServiceInfo.ServiceInfo.BuilderBase<BUILDER extends ServiceInfo.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ServiceInfo> Fluent API builder base forServiceInfo.Generated implementation of the prototype, can be extended by descendant prototype implementations.Basic service info that describes a service provider type.Fluent API builder forServiceInfoBasics.ServiceInfoBasics.BuilderBase<BUILDER extends ServiceInfoBasics.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ServiceInfoBasics> Fluent API builder base forServiceInfoBasics.Generated implementation of the prototype, can be extended by descendant prototype implementations.Criteria to discover services.Fluent API builder forServiceInfoCriteria.ServiceInfoCriteria.BuilderBase<BUILDER extends ServiceInfoCriteria.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ServiceInfoCriteria> Fluent API builder base forServiceInfoCriteria.Generated implementation of the prototype, can be extended by descendant prototype implementations.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 toServiceProviderthat allows for startup binding from aInjection$$Application, and thereby works in conjunction with theServiceBinderduring injection service registry initialization.Represents an injection exception.Instances of these provide lists and maps ofServiceProviders.The service registry.Some components may require start when Helidon is bootstrapped, such as WebServer (to open server sockets).