Class ServiceRegistryConfig.Builder
java.lang.Object
io.helidon.service.registry.ServiceRegistryConfig.BuilderBase<ServiceRegistryConfig.Builder, ServiceRegistryConfig>
io.helidon.service.registry.ServiceRegistryConfig.Builder
- All Implemented Interfaces:
Prototype.Builder<ServiceRegistryConfig.Builder, ServiceRegistryConfig>, Builder<ServiceRegistryConfig.Builder, ServiceRegistryConfig>, Supplier<ServiceRegistryConfig>
- Enclosing interface:
ServiceRegistryConfig
public static class ServiceRegistryConfig.Builder
extends ServiceRegistryConfig.BuilderBase<ServiceRegistryConfig.Builder, ServiceRegistryConfig>
implements Builder<ServiceRegistryConfig.Builder, ServiceRegistryConfig>
Fluent API builder for
ServiceRegistryConfig.-
Nested Class Summary
Nested classes/interfaces inherited from class ServiceRegistryConfig.BuilderBase
ServiceRegistryConfig.BuilderBase.ServiceRegistryConfigImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an instance from this builder.Create an instance of the prototype.Methods inherited from class ServiceRegistryConfig.BuilderBase
addRunLevel, addRunLevels, addServiceDescriptor, addServiceDescriptors, addServiceInstances, allowLateBinding, allowLateBinding, clearRunLevels, clearServiceDescriptors, discoverServices, discoverServices, discoverServicesFromServiceLoader, discoverServicesFromServiceLoader, from, from, interceptionEnabled, interceptionEnabled, limitActivationPhase, limitActivationPhase, lookupCacheEnabled, lookupCacheEnabled, lookupCacheSize, lookupCacheSize, maxRunLevel, maxRunLevel, preBuildPrototype, putContractInstance, putContractInstance, putServiceInstance, runLevels, runLevels, serviceDescriptors, serviceDescriptors, serviceInstances, serviceInstances, toString, useBinding, useBinding, validatePrototypeModifier and TypeMethodDescriptionaddRunLevel(Double runLevel) Run levels that should be initialized at startup.addRunLevels(List<Double> runLevels) Run levels that should be initialized at startup.addServiceDescriptor(ServiceDescriptor<?> serviceDescriptor) Manually registered service descriptors to add to the registry.addServiceDescriptors(List<ServiceDescriptor<?>> serviceDescriptors) Manually registered service descriptors to add to the registry.addServiceInstances(Map<ServiceDescriptor<?>, ?> serviceInstances) Manually register initial bindings for some of the services in the registry.booleanWhether to allow binding via methods, such asServices.set(Class, Object[]).allowLateBinding(boolean allowLateBinding) Whether to allow binding via methods, such asServices.set(Class, Object[]).Clear all runLevels.Clear all serviceDescriptors.booleanWhether to discover services from the class path.discoverServices(boolean discoverServices) Whether to discover services from the class path.booleanWhether to discover services from Java service loader.discoverServicesFromServiceLoader(boolean discoverServicesFromServiceLoader) Whether to discover services from Java service loader.from(ServiceRegistryConfig prototype) Update this builder from an existing prototype instance.from(ServiceRegistryConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.booleanFlag indicating whether runtime interception is enabled.interceptionEnabled(boolean interceptionEnabled) Flag indicating whether runtime interception is enabled.In certain conditions Injection services should be initialized but not started (i.e., avoiding calls toPostConstructetc.).limitActivationPhase(ActivationPhase limitActivationPhase) In certain conditions Injection services should be initialized but not started (i.e., avoiding calls toPostConstructetc.).booleanFlag indicating whether service lookups (i.e., viaServiceRegistry.first(io.helidon.service.registry.Lookup)) are cached.lookupCacheEnabled(boolean lookupCacheEnabled) Flag indicating whether service lookups (i.e., viaServiceRegistry.first(io.helidon.service.registry.Lookup)) are cached.intSize of the lookup cache whenServiceRegistryConfig.lookupCacheEnabled()is set totrue.lookupCacheSize(int lookupCacheSize) Size of the lookup cache whenServiceRegistryConfig.lookupCacheEnabled()is set totrue.doubleMaximal run level to handle when starting fromServiceRegistryManager.start(Binding).maxRunLevel(double maxRunLevel) Maximal run level to handle when starting fromServiceRegistryManager.start(Binding).protected voidHandles providers and decorators.putContractInstance(TypeName contract, Object instance) Put an instance of a contract.putContractInstance(Class<?> contract, Object instance) Put an instance of a contract.putServiceInstance(ServiceDescriptor<TYPE> key, TYPE serviceInstance) Manually register initial bindings for some of the services in the registry.Run levels that should be initialized at startup.Run levels that should be initialized at startup.Manually registered service descriptors to add to the registry.serviceDescriptors(List<ServiceDescriptor<?>> serviceDescriptors) Manually registered service descriptors to add to the registry.Map<ServiceDescriptor<?>, Object> Manually register initial bindings for some of the services in the registry.serviceInstances(Map<ServiceDescriptor<?>, ?> serviceInstances) Manually register initial bindings for some of the services in the registry.toString()booleanFlag indicating whether compile-time generatedBinding's should be used at initialization when starting the registry usingServiceRegistryManager.start(Binding).useBinding(boolean useBinding) Flag indicating whether compile-time generatedBinding's should be used at initialization when starting the registry usingServiceRegistryManager.start(Binding).protected voidValidates required properties.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault ServiceRegistryConfigget()default ServiceRegistryConfig.Builderidentity()Instance of this builder as the correct type.default ServiceRegistryConfig.Builderupdate(Consumer<ServiceRegistryConfig.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault ServiceRegistryConfig.Builderself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
Create an instance of the prototype. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildPrototypein interfacePrototype.Builder<ServiceRegistryConfig.Builder, ServiceRegistryConfig>- Returns:
- an instance of the setup object created from this builder
-
build
Create an instance from this builder. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildin interfaceBuilder<ServiceRegistryConfig.Builder, ServiceRegistryConfig>- Returns:
- instance of the built type
-