Module io.helidon.service.registry
This module is a replacement for Java ServiceLoader that supports dependency injections and interception.
It is fully build-time based, and when used together with Helidon Declarative features, and Service Maven plugin, it
allows creation of applications that have no discovery at startup, and computed bindings.
The concept is based on the following principals:
- Build time processing - using annotation processors (we use "Codegen" in Helidon)
- Reflection free where possible - all generated code is reflection free
- Discovery free - when used together with the Service Maven Plugin and Declarative programming model, there is no runtime discovery (i.e. no classpath scanning, no loading of resources etc.)
Services.set(Class, Object[])), or
to get services that are "global" (see Services.get(Class)).
The two main modules that are required to utilize the full power of service registry are the Service Codegen
(io.helidon.service:helidon-service-codegen, to set it up as an annotation processor, also needs
io.helidon.codegen:helidon-codegen-apt) - this module is required to declare new services,
and the Service Maven Plugin (io.helidon.service:helidon-service-maven-plugin) - this module is only needed
to bypass discovery and runtime service binding for Helidon Declarative applications.
- See Also:
-
Packages
ExportsPackageDescriptionAPI required to define services, and to compile the code generated sources for Helidon Service Registry, with a core service registry implementation (replacement forServiceLoader).Indirect Exports -
Modules
RequiresModifierModuleDescriptiontransitiveThe Builder API module.transitiveBuilder (minimal) types support.Indirect Requires