Package org.jboss.weld.config
Enum ConfigurationKey
- java.lang.Object
-
- java.lang.Enum<ConfigurationKey>
-
- org.jboss.weld.config.ConfigurationKey
-
- All Implemented Interfaces:
Serializable,Comparable<ConfigurationKey>
public enum ConfigurationKey extends Enum<ConfigurationKey>
This enum lists all the supported configuration keys.- Author:
- Martin Kouba
- See Also:
WeldConfiguration,SystemPropertiesConfiguration
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BEAN_IDENTIFIER_INDEX_OPTIMIZATIONThis optimization is used to reduce the HTTP session replication overhead.CONCURRENT_DEPLOYMENTIndicates whether ConcurrentDeployer and ConcurrentValidator should be enabled.CONTEXT_ATTRIBUTES_LAZY_FETCHIf set totrue, the attributes should be fetched lazily from the backing store for some contexts (e.g.CONVERSATION_CONCURRENT_ACCESS_TIMEOUTConversation concurrent access timeout in milliseconds represents maximum time to wait on the conversation concurrent lock.CONVERSATION_TIMEOUTConversation timeout in milliseconds.DEFAULT_BEAN_NAMES_FOLLOW_JAVABEAN_RULESIf set totruethe default name follows the rules from the original JavaBean specification.DISABLE_XML_VALIDATIONXML descriptor validation is enabled by default.EXECUTOR_THREAD_POOL_DEBUGIf set to true, debug timing information is printed to the standard output.EXECUTOR_THREAD_POOL_KEEP_ALIVE_TIMEKeep-alive time in seconds.EXECUTOR_THREAD_POOL_SIZEThe number of threads to be used for bean loading and deployment.EXECUTOR_THREAD_POOL_TYPEThe type of the thread pool.INJECTABLE_REFERENCE_OPTIMIZATIONFor certain combinations of scopes, the container is permitted to optimize an injectable reference lookup.NON_PORTABLE_MODEAllows an integrator to enable the non-portable mode.PRELOADER_THREAD_POOL_SIZEThe number of threads used by ContainerLifecycleEventPreloader.PROBE_ALLOW_REMOTE_ADDRESSA regular expression used to limit access to the Probe REST API.PROBE_EMBED_INFO_SNIPPETIf set totruean informative HTML snippet will be added to every response with Content-Type of valuetext/html.PROBE_EVENT_MONITOR_CONTAINER_LIFECYCLE_EVENTSIf set totrueall the container lifecycle events are monitored during bootstrap.PROBE_EVENT_MONITOR_EXCLUDE_TYPEA regular expression.PROBE_INVOCATION_MONITOR_EXCLUDE_TYPEA regular expression.PROBE_INVOCATION_MONITOR_SKIP_JAVABEAN_PROPERTIESIf set totruethe JavaBean accessor methods are not monitored.PROBE_JMX_SUPPORTIf set totrueone or more MBean components may be registered so that it is possible to use JMX to access the Probe development tool data.PROXY_DUMPFor debug purposes, it's possible to dump the generated bytecode of proxies and subclasses.PROXY_IGNORE_FINAL_METHODSWeld supports a non-standard workaround to be able to create proxies for Java types which declare non-private non-static final methods.PROXY_INSTANTIATORAllowsProxyInstantiatorto be selected explicitly.PROXY_UNSAFEDeprecated.this option is deprecated.RELAXED_CONSTRUCTIONWeld supports a non-standard workaround to be able to create client proxies for Java types that cannot be proxied by the container, using non-portable JVM APIs.RESOLUTION_CACHE_SIZEWeld caches resolved injection points in order to resolve them faster in the future.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectconvertValue(String value)static ConfigurationKeyfromString(String from)Stringget()ObjectgetDefaultValue()booleanisValidValue(Object value)booleanisValidValueType(Class<?> valueType)static booleanisValueTypeSupported(Class<?> valueType)static ConfigurationKeyvalueOf(String name)Returns the enum constant of this type with the specified name.static ConfigurationKey[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONCURRENT_DEPLOYMENT
public static final ConfigurationKey CONCURRENT_DEPLOYMENT
Indicates whether ConcurrentDeployer and ConcurrentValidator should be enabled. If enabled, ConcurrentDeployer and ConcurrentValidator execute their subtasks usingExecutorServiceswhich can be configured separately. Otherwise, single-threaded version of Deployer and Validator are used. By default, concurrent deployment is enabled.
-
PRELOADER_THREAD_POOL_SIZE
public static final ConfigurationKey PRELOADER_THREAD_POOL_SIZE
The number of threads used by ContainerLifecycleEventPreloader. The ContainerLifecycleEventPreloader allows observer methods for container lifecycle events to be resolved upfront while the deployment is waiting for classloader or reflection API. ContainerLifecycleEventPreloader has its own thread pool whose size is configured by this property. If set to 0, ContainerLifecycleEventPreloader is not installed. If not specified, the value is set to Math.max(1, Runtime.getRuntime().availableProcessors() - 1)).
-
NON_PORTABLE_MODE
public static final ConfigurationKey NON_PORTABLE_MODE
Allows an integrator to enable the non-portable mode. Non-portable mode is suggested by the specification to overcome problems with legacy applications not using CDI SPI properly. The non-portable mode is disabled by default.
-
EXECUTOR_THREAD_POOL_SIZE
public static final ConfigurationKey EXECUTOR_THREAD_POOL_SIZE
The number of threads to be used for bean loading and deployment.
-
EXECUTOR_THREAD_POOL_DEBUG
public static final ConfigurationKey EXECUTOR_THREAD_POOL_DEBUG
If set to true, debug timing information is printed to the standard output.
-
EXECUTOR_THREAD_POOL_TYPE
public static final ConfigurationKey EXECUTOR_THREAD_POOL_TYPE
The type of the thread pool. Possible values are: FIXED, FIXED_TIMEOUT, NONE, SINGLE_THREAD.
-
EXECUTOR_THREAD_POOL_KEEP_ALIVE_TIME
public static final ConfigurationKey EXECUTOR_THREAD_POOL_KEEP_ALIVE_TIME
Keep-alive time in seconds. Passed to the constructor of the ThreadPoolExecutor class, maximum time that excess idle threads will wait for new tasks before terminating.
-
RESOLUTION_CACHE_SIZE
public static final ConfigurationKey RESOLUTION_CACHE_SIZE
Weld caches resolved injection points in order to resolve them faster in the future. There exists a separate type safe resolver for beans, decorators, disposers, interceptors and observers. Each of them stores resolved injection points in its cache, which maximum size is bounded by a default value (common to all of them).- See Also:
- WELD-1323
-
PROXY_DUMP
public static final ConfigurationKey PROXY_DUMP
For debug purposes, it's possible to dump the generated bytecode of proxies and subclasses.
-
RELAXED_CONSTRUCTION
public static final ConfigurationKey RELAXED_CONSTRUCTION
Weld supports a non-standard workaround to be able to create client proxies for Java types that cannot be proxied by the container, using non-portable JVM APIs.
-
PROXY_INSTANTIATOR
public static final ConfigurationKey PROXY_INSTANTIATOR
AllowsProxyInstantiatorto be selected explicitly. This is only intended for testing purposes and should never be set by an application.
-
PROXY_UNSAFE
public static final ConfigurationKey PROXY_UNSAFE
Deprecated.this option is deprecated. RELAXED_CONSTRUCTION should be used insteadWeld supports a non-standard workaround to be able to create client proxies for Java types that cannot be proxied by the container, using non-portable JVM APIs.
-
DISABLE_XML_VALIDATION
public static final ConfigurationKey DISABLE_XML_VALIDATION
XML descriptor validation is enabled by default.
-
INJECTABLE_REFERENCE_OPTIMIZATION
public static final ConfigurationKey INJECTABLE_REFERENCE_OPTIMIZATION
For certain combinations of scopes, the container is permitted to optimize an injectable reference lookup. The optimization is disabled by default as it does not match theAlterableContextcontract.
-
PROBE_INVOCATION_MONITOR_EXCLUDE_TYPE
public static final ConfigurationKey PROBE_INVOCATION_MONITOR_EXCLUDE_TYPE
A regular expression. If a non-empty string and the base type for an AnnotatedType or a declaring type for an AnnotatedMember matches this pattern the type is excluded from monitoring, i.e. the invocation monitor interceptor is not associated.
-
PROBE_INVOCATION_MONITOR_SKIP_JAVABEAN_PROPERTIES
public static final ConfigurationKey PROBE_INVOCATION_MONITOR_SKIP_JAVABEAN_PROPERTIES
If set totruethe JavaBean accessor methods are not monitored.
-
PROBE_EVENT_MONITOR_EXCLUDE_TYPE
public static final ConfigurationKey PROBE_EVENT_MONITOR_EXCLUDE_TYPE
A regular expression. If a non-empty string and the runtime class of the event object matches this pattern the event is excluded from monitoring.
-
BEAN_IDENTIFIER_INDEX_OPTIMIZATION
public static final ConfigurationKey BEAN_IDENTIFIER_INDEX_OPTIMIZATION
This optimization is used to reduce the HTTP session replication overhead. However, the inconsistency detection mechanism may cause problems in some development environments.
-
PROBE_EMBED_INFO_SNIPPET
public static final ConfigurationKey PROBE_EMBED_INFO_SNIPPET
If set totruean informative HTML snippet will be added to every response with Content-Type of valuetext/html.
-
DEFAULT_BEAN_NAMES_FOLLOW_JAVABEAN_RULES
public static final ConfigurationKey DEFAULT_BEAN_NAMES_FOLLOW_JAVABEAN_RULES
If set totruethe default name follows the rules from the original JavaBean specification. Otherwise (default, portable solution), the CDI specification requirements are met.
-
CONTEXT_ATTRIBUTES_LAZY_FETCH
public static final ConfigurationKey CONTEXT_ATTRIBUTES_LAZY_FETCH
If set totrue, the attributes should be fetched lazily from the backing store for some contexts (e.g. attributes of an HTTP session for a session context).
-
PROBE_JMX_SUPPORT
public static final ConfigurationKey PROBE_JMX_SUPPORT
If set totrueone or more MBean components may be registered so that it is possible to use JMX to access the Probe development tool data.
-
PROBE_EVENT_MONITOR_CONTAINER_LIFECYCLE_EVENTS
public static final ConfigurationKey PROBE_EVENT_MONITOR_CONTAINER_LIFECYCLE_EVENTS
If set totrueall the container lifecycle events are monitored during bootstrap. Note that this feature has negative impact on the bootstrap performance.
-
PROBE_ALLOW_REMOTE_ADDRESS
public static final ConfigurationKey PROBE_ALLOW_REMOTE_ADDRESS
A regular expression used to limit access to the Probe REST API. The default value attempts to match connections from localhost only, i.e. it's matching the following addresses:127.0.0.1::1, incl. zone indices (e.g.::1%0)0:0:0:0:0:0:0:1, incl. zone indices (e.g.0:0:0:0:0:0:0:1%eth0)
io.undertow.server.handlers.ProxyPeerAddressHandler,org.apache.catalina.valves.RemoteIpValve, etc.).
-
PROXY_IGNORE_FINAL_METHODS
public static final ConfigurationKey PROXY_IGNORE_FINAL_METHODS
Weld supports a non-standard workaround to be able to create proxies for Java types which declare non-private non-static final methods. These methods are completely ignored during proxy generation, and should never be invoked upon the proxy instance!A regular expression. If an unproxyable type matches this pattern, the type is considered proxyable and final methods are ignored.
-
CONVERSATION_TIMEOUT
public static final ConfigurationKey CONVERSATION_TIMEOUT
Conversation timeout in milliseconds. Default value is 600 000 ms.
-
CONVERSATION_CONCURRENT_ACCESS_TIMEOUT
public static final ConfigurationKey CONVERSATION_CONCURRENT_ACCESS_TIMEOUT
Conversation concurrent access timeout in milliseconds represents maximum time to wait on the conversation concurrent lock. Default value is 1000 ms.
-
-
Method Detail
-
values
public static ConfigurationKey[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ConfigurationKey c : ConfigurationKey.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConfigurationKey valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
get
public String get()
- Returns:
- the string representation of the key
-
getDefaultValue
public Object getDefaultValue()
- Returns:
- the default value
-
isValidValue
public boolean isValidValue(Object value)
- Parameters:
value-- Returns:
trueif the given value corresponds to the type of the default value,falseotherwise
-
isValidValueType
public boolean isValidValueType(Class<?> valueType)
- Parameters:
valueType-- Returns:
trueif the given value type corresponds to the type of the default value,falseotherwise
-
convertValue
public Object convertValue(String value)
- Parameters:
value-- Returns:
- the converted value
-
isValueTypeSupported
public static boolean isValueTypeSupported(Class<?> valueType)
- Parameters:
valueType-- Returns:
trueif the given value type is supported,falseotherwise
-
fromString
public static ConfigurationKey fromString(String from)
- Parameters:
from-- Returns:
- the key with the given value, or
nullif no such exists
-
-