If left as-is a default configuration instance will be used with default values provided herein. Callers can
optionally configure values by providing a Bootstrap.config() prior to Pico startup. The configuration provided
will be used, and tunable configuration must be located under the key NAME within the provided configuration
element.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default deadlock detection timeout in millis.static final StringThe default value for this is false, meaning that the activation logs will not be captured or recorded or logged.static final StringThe default value for this is false, meaning that the services registry can be changed during runtime post Pico startup.static final StringThe default value for this is false, meaning that the Pico will make not attempt to use reflection during runtime operations.static final StringThe default value for this is false, meaning that no caching will occur.static final StringThe default value is true, meaning that the provider supports compile-time code generation of DI artifacts.static final StringThe default value is false, meaning that contextual lookup is not supported.static final StringThe default value for this is false, meaning that the services registry supports dynamic behavior post Pico startup.static final StringThe default value is true, meaning that the default Pico implementation supports the jsr330 specification (i.e., one that passes the jsr330 TCK).static final StringThe default value is false, meaning that the default provider implementation does not support private injection points.static final StringThe default value is false, meaning that the default provider implementation does not support static injection points.static final StringThe default value for this is false, meaning that the reflection is not supported by the provider.static final StringThe default value for this is true, meaning that the Pico will attempt to find and useApplicationcode generated during compile-time (see Pico's APT processor and maven-plugin modules for usage).static final StringThe default value for this is true, meaning that the Pico will attempt to find and useModulecode generated during compile-time (see Pico's APT processor and maven-plugin modules for usage).static final StringThe default value for this is false, meaning that the Pico implementation will not follow a strict jsr330 interpretation of the specification.static final StringThe fully qualified name for pico.static final StringApplicable during activation, this is the key that controls the timeout before deadlock detection exceptions are thrown.static final StringApplicable for enabling the capture of activation logs at Pico startup.static final StringThe key that controls whether theServicesregistry is permitted to expand or be dynamically altered after JVM startup.static final StringThe key that controls whether reflection is permitted to be used during Pico runtime operations.static final StringThe key association with the name of the provider implementation.static final StringThe key association with the version of the provider implementation.static final StringApplicable for enabling service lookup caching.static final StringThe key that represents whether the provider supports compile-time code generation of DI artifacts.static final StringKey indicating support for contextual lookup viaServices.contextualServices(InjectionPointInfo).static final StringThe key that indicates whether theServicesregistry is capable of expanding or being dynamically altered after JVM startup.static final StringThe key to represent whether the provider supports the jsr330 specification.static final StringKey indicating support for private injection points.static final StringKey indicating support for static injection points.static final StringThe key that indicates whether the reflection is supported in normal runtime behavior.static final StringThe key that controls whether anyApplication's (typically produced at compile-time by Pico tooling) can be discovered and is used during Pico startup processing.static final StringThe key that controls whether anyModule's (typically produced at compile-time by Pico tooling) can be discovered and is used during Pico startup processing.static final StringThe key that controls whether strict jsr330 specification interpretation is used.static final StringThe short name for pico.static final StringTag for putting Pico tooling, processing, and runtime into debug mode.static final StringIdentify the module name being processed or the desired target module name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongThe deadlock detection timeout in millis.booleanFlag indicating whether activation logs are captured, recorded, and retained.booleanFlag indicating whether the services registry permits dynamic behavior (key isKEY_PERMITS_DYNAMIC).booleanFlag indicating whether reflection is permitted (key isKEY_PERMITS_DYNAMIC).abstract StringThe provider implementation name.abstract StringThe provider implementation version.booleanFlag indicating whether service lookups (i.e., viaServices.lookup(java.lang.Class<T>)) are cached.abstract booleanFlag indicating whether the dependency injection model for theApplicationandActivatoris capable for being produced at compile-time, and therefore used/loaded during runtime operations.abstract booleanFlag indicating whether contextual lookup is supported viaServices.contextualServices(InjectionPointInfo).abstract booleanFlag indicating whether the services registry supports dynamic behavior (key isKEY_SUPPORTS_DYNAMIC).abstract booleanFlag indicating whether jsr330 is supported by the provider implementation.abstract booleanFlag indicating whether jsr330 is supported by the provider implementation for the use on private injection points.abstract booleanFlag indicating whether jsr330 is supported by the provider implementation for the use on static injection points.abstract booleanFlag indicating whether the reflection is supported.booleanFlag indicating whether compile-time generatedApplication's should be used at Pico's startup initialization.booleanFlag indicating whether compile-time generatedModule's should be used at Pico's startup initialization.booleanFlag indicating whether jsr330 specification will be used and enforced.
-
Field Details
-
NAME
The short name for pico.- See Also:
-
FQN
The fully qualified name for pico.- See Also:
-
KEY_PROVIDER_NAME
The key association with the name of the provider implementation.- See Also:
-
TAG_DEBUG
Tag for putting Pico tooling, processing, and runtime into debug mode.- See Also:
-
TAG_MODULE_NAME
Identify the module name being processed or the desired target module name.- See Also:
-
KEY_PROVIDER_VERSION
The key association with the version of the provider implementation.- See Also:
-
KEY_ACTIVATION_DEADLOCK_TIMEOUT_IN_MILLIS
Applicable during activation, this is the key that controls the timeout before deadlock detection exceptions are thrown.Deadlock can occur in situations where there are cyclic, non-
Provider<>type dependencies between two services, e.g., A -> B and B -> A. Obviously this example is the simplest of cases. More often cyclic dependencies are nested N levels deep.Pico may attempt to resolve cyclic dependencies, but this timeout will govern how long Pico will wait before giving up and instead will result in an exception being thrown.
There are two best practices recommended:
- Use
Provider<>as often as possible. If a service activation does not a dependency duringPostConstructthen there is really no need to have a direct dependency to that service. - Use compile-time
Applicationgeneration. See the Pico maven-plugin module for details. Use of this feature will detect all cyclic dependencies at compile-time and will result in faster startup times.
- See Also:
- Use
-
DEFAULT_ACTIVATION_DEADLOCK_TIMEOUT_IN_MILLIS
The default deadlock detection timeout in millis.- See Also:
-
KEY_ACTIVATION_LOGS
Applicable for enabling the capture of activation logs at Pico startup.- See Also:
-
DEFAULT_ACTIVATION_LOGS
The default value for this is false, meaning that the activation logs will not be captured or recorded or logged.- See Also:
-
KEY_SERVICE_LOOKUP_CACHING
Applicable for enabling service lookup caching.- See Also:
-
DEFAULT_SERVICE_LOOKUP_CACHING
The default value for this is false, meaning that no caching will occur.- See Also:
-
KEY_PERMITS_DYNAMIC
The key that controls whether theServicesregistry is permitted to expand or be dynamically altered after JVM startup.- See Also:
-
DEFAULT_PERMITS_DYNAMIC
The default value for this is false, meaning that the services registry can be changed during runtime post Pico startup.- See Also:
-
KEY_SUPPORTS_DYNAMIC
The key that indicates whether theServicesregistry is capable of expanding or being dynamically altered after JVM startup. This is referred to as the service registry being dynamic in nature.- See Also:
-
DEFAULT_SUPPORTS_DYNAMIC
The default value for this is false, meaning that the services registry supports dynamic behavior post Pico startup.- See Also:
-
KEY_PERMITS_REFLECTION
The key that controls whether reflection is permitted to be used during Pico runtime operations. The default implementation of Pico does not support runtime reflection usage; it is only supported via the Pico maven-plugin and supporting tooling, which typically occurs during compile-time operations but not during normal runtime operations.- See Also:
-
DEFAULT_PERMITS_REFLECTION
The default value for this is false, meaning that the Pico will make not attempt to use reflection during runtime operations.- See Also:
-
KEY_SUPPORTS_REFLECTION
The key that indicates whether the reflection is supported in normal runtime behavior.- See Also:
-
DEFAULT_SUPPORTS_REFLECTION
The default value for this is false, meaning that the reflection is not supported by the provider.- See Also:
-
KEY_USES_COMPILE_TIME_APPLICATIONS
The key that controls whether anyApplication's (typically produced at compile-time by Pico tooling) can be discovered and is used during Pico startup processing. It is strongly suggested for developers to adopt a compile-time strategy for producing the dependency/injection model as it will lead to faster startup times as well as be deterministic and validated during compile-time instead of at runtime.- See Also:
-
DEFAULT_USES_COMPILE_TIME_APPLICATIONS
The default value for this is true, meaning that the Pico will attempt to find and useApplicationcode generated during compile-time (see Pico's APT processor and maven-plugin modules for usage).- See Also:
-
KEY_USES_COMPILE_TIME_MODULES
The key that controls whether anyModule's (typically produced at compile-time by Pico tooling) can be discovered and is used during Pico startup processing. It is strongly suggested for developers to adopt a compile-time strategy for producing the dependency/injection model as it will lead to faster startup times as well as be deterministic and validated during compile-time instead of at runtime.- See Also:
-
DEFAULT_USES_COMPILE_TIME_MODULES
The default value for this is true, meaning that the Pico will attempt to find and useModulecode generated during compile-time (see Pico's APT processor and maven-plugin modules for usage).- See Also:
-
KEY_SUPPORTS_COMPILE_TIME
The key that represents whether the provider supports compile-time code generation of DI artifacts.- See Also:
-
DEFAULT_SUPPORTS_COMPILE_TIME
The default value is true, meaning that the provider supports compile-time code generation of DI artifacts.- See Also:
-
KEY_USES_JSR330
The key that controls whether strict jsr330 specification interpretation is used. See the README for additional details.- See Also:
-
DEFAULT_USES_JSR330
The default value for this is false, meaning that the Pico implementation will not follow a strict jsr330 interpretation of the specification. See the README for additional details.- See Also:
-
KEY_SUPPORTS_JSR330
The key to represent whether the provider supports the jsr330 specification.- See Also:
-
DEFAULT_SUPPORTS_JSR330
The default value is true, meaning that the default Pico implementation supports the jsr330 specification (i.e., one that passes the jsr330 TCK).- See Also:
-
KEY_SUPPORTS_JSR330_STATICS
Key indicating support for static injection points. Note: this is optional in jsr330.- See Also:
-
DEFAULT_SUPPORTS_JSR330_STATICS
The default value is false, meaning that the default provider implementation does not support static injection points.- See Also:
-
KEY_SUPPORTS_JSR330_PRIVATES
Key indicating support for private injection points. Note: this is optional in jsr330.- See Also:
-
DEFAULT_SUPPORTS_JSR330_PRIVATES
The default value is false, meaning that the default provider implementation does not support private injection points.- See Also:
-
KEY_SUPPORTS_CONTEXTUAL_LOOKUP
Key indicating support for contextual lookup viaServices.contextualServices(InjectionPointInfo).- See Also:
-
DEFAULT_SUPPORTS_CONTEXTUAL_LOOKUP
The default value is false, meaning that contextual lookup is not supported.- See Also:
-
-
Constructor Details
-
PicoServicesConfig
protected PicoServicesConfig()Default Constructor.
-
-
Method Details
-
providerName
The provider implementation name.- Returns:
- the provider implementation name
-
providerVersion
The provider implementation version.- Returns:
- the provider implementation version
-
activationDeadlockDetectionTimeoutMillis
public long activationDeadlockDetectionTimeoutMillis()The deadlock detection timeout in millis.- Returns:
- the deadlock detection timeout in mills
-
activationLogs
public boolean activationLogs()Flag indicating whether activation logs are captured, recorded, and retained.- Returns:
- the flag indicating whether activation logs are captured and retained
-
serviceLookupCaching
public boolean serviceLookupCaching()Flag indicating whether service lookups (i.e., viaServices.lookup(java.lang.Class<T>)) are cached.- Returns:
- the flag indicating whether service lookups are cached
-
permitsDynamic
public boolean permitsDynamic()Flag indicating whether the services registry permits dynamic behavior (key isKEY_PERMITS_DYNAMIC). The default implementation of Pico supports dynamic (seesupportsDynamic()), but does not permit it by default.- Returns:
- the flag indicating whether the services registry supports dynamic updates of the service registry
-
supportsDynamic
public abstract boolean supportsDynamic()Flag indicating whether the services registry supports dynamic behavior (key isKEY_SUPPORTS_DYNAMIC). Note that if the provider does not support this flag then permitting it viapermitsDynamic()will have no affect. The default implementation of Pico supports dynamic, but does not permit it by default.- Returns:
- the flag indicating whether the services registry supports dynamic updates of the service registry post Pico startup
-
permitsReflection
public boolean permitsReflection()Flag indicating whether reflection is permitted (key isKEY_PERMITS_DYNAMIC). The default implementation of Pico supports reflection at compile-time only, and is not controlled by this flag directly.- Returns:
- the flag indicating whether the provider is permitted to use reflection for normal runtime usage
-
supportsReflection
public abstract boolean supportsReflection()Flag indicating whether the reflection is supported. Note that if the provider does not support this flag then permitting it viapermitsReflection()will have no affect. The default implementation of Pico supports reflection only during compile-time operations using the Pico maven-plugin.- Returns:
- the flag indicating whether reflection is supported during runtime operations
-
usesCompileTimeApplications
public boolean usesCompileTimeApplications()Flag indicating whether compile-time generatedApplication's should be used at Pico's startup initialization. Setting this value to false will have no affect if the underlying provider does not support compile-time generation viasupportsCompileTime().- Returns:
- the flag indicating whether the provider is permitted to use Application generated code from compile-time
- See Also:
-
usesCompileTimeModules
public boolean usesCompileTimeModules()Flag indicating whether compile-time generatedModule's should be used at Pico's startup initialization. Setting this value to false will have no affect if the underlying provider does not support compile-time generation viasupportsCompileTime().- Returns:
- the flag indicating whether the provider is permitted to use Application generated code from compile-time
- See Also:
-
supportsCompileTime
public abstract boolean supportsCompileTime()Flag indicating whether the dependency injection model for theApplicationandActivatoris capable for being produced at compile-time, and therefore used/loaded during runtime operations.- Returns:
- the flag indicating whether the provider supports compile-time code generation of DI artifacts
-
usesJsr330
public boolean usesJsr330()Flag indicating whether jsr330 specification will be used and enforced.- Returns:
- the flag indicating whether strict jsr330 specification will be enforced
-
supportsJsr330
public abstract boolean supportsJsr330()Flag indicating whether jsr330 is supported by the provider implementation.- Returns:
- the flag indicating whether the provider supports the jsr330 specification
-
supportsJsr330Statics
public abstract boolean supportsJsr330Statics()Flag indicating whether jsr330 is supported by the provider implementation for the use on static injection points.- Returns:
- the flag indicating whether the provider supports the jsr330 specification for the use of static injection points
-
supportsJsr330Privates
public abstract boolean supportsJsr330Privates()Flag indicating whether jsr330 is supported by the provider implementation for the use on private injection points.- Returns:
- the flag indicating whether the provider supports the jsr330 specification for the use of private injection points
-
supportsContextualLookup
public abstract boolean supportsContextualLookup()Flag indicating whether contextual lookup is supported viaServices.contextualServices(InjectionPointInfo).- Returns:
- the flag indicating whether the provider supports contextual lookup
-