Package org.jolokia.server.core.config
Enum Class ConfigKey
- All Implemented Interfaces:
Serializable,Comparable<ConfigKey>,java.lang.constant.Constable
Enumeration defining the various configuration constant names which
can be used to configure the agent globally (e.g. in web.xml) or
as processing parameters (e.g. as query params).
- Since:
- Jan 1, 2010
- Author:
- roland, nevenr
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionContext used for agent, used e.g.A description which can be used to describe the agent further.The ID to uniquely identify this agent within a JVM.The agent type holds the information which kind of agent (war,jvm,osgi) is in use.Whether a reverse DNS lookup is allowed or not.Whether expose extended error information like stacktraces or serialized exception at all.Custom authenticator to be used instead of default user/password one (JVM agent)Whether to ignore CERTS when doing a dispatching authentication (authMode == delegate)If MultiAuthenticator is used, this config item explains how to combine multiple authenticators Supported values: "any" at least one authenticator must match, "all" all authenticators must matchWhat authentication to use.Extractor specification for getting the principal (authMode == delegate)URL used for a dispatcher authentication (authMode == delegate)Option which can be given to a request to specify a JSONP callback.Whether property keys of ObjectNames should be ordered in the canonical way or in the way that they are created.Whether debug is switched on or notMaximum number of debug entries to holdExtra options passed to a server handle after it has been detected.Specify the agent URL to return for an discovery multicast request.Whether to enable listening and responding to discovery multicast requests for discovering agent details.Maximum number of history entries to keepDeprecated.Whiteboard specification can no longer point to specific HttpService implementation.For LIST requests, this option can be used to return the result only if they set of registered MBeans has been changed since the timestamp given in this option.Runtime configuration (i.e.Whether to include a stack trace in the response when an error occurs.Path to a white list of patterns which are matched against possible JMX service URL for incoming requestsDeprecated.option is kept for compatibility reasons, because OSGi servlet is now registered using Servlet Whiteboard pattern.Log handler class to use, which must have an empty constructor.Log handler name to use.Maximum size of collections returned during serialization.Maximum traversal depth for serialization of complex objects.Maximum number of objects returned by serializationOptional domain name for registering own MBeansMime Type to use for the response value.IPv4 Address for Jolokia's Multicast group.Multicast port where to listen for queries.Password for authentication purposes.Query parameter used for providing a path in order to avoid escaping issues.Init parameter for the location of the policy file.The security realm used for loginBy default, the OSGi Agent uses Whiteboard pattern to register an agent servlet.Custom restrictor to be used instead of default oneWhether to include a JSON serialized version of the exception.How to serialize long values: "number" or "string"Whether to use streaming json responses.For OSGi, if set to true, the agent uses a restrictor service when it kicks in, but denies access otherwise.User for authentication purposes. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringJAAS Subject to attach to an HTTP request as attribute if JAAS based authentication is in use. -
Method Summary
Modifier and TypeMethodDescriptionGet the value of this key as it could be possibly used as an environment variable inSystem.getenv(String).Get the value of this key as it could be possibly used as a system property toSystem.getProperty(String).Get the default valuestatic ConfigKeygetGlobalConfigKey(String pKeyS) Get the configuration key for a global configurationGet the string value of a keystatic ConfigKeygetRequestConfigKey(String pKeyS) Get the configuration key for a request configurationbooleanWhether this key is a global configuration keybooleanWhether this key is a request configuration keytoString()static ConfigKeyReturns the enum constant of this class with the specified name.static ConfigKey[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HISTORY_MAX_ENTRIES
Maximum number of history entries to keep -
DEBUG
Whether debug is switched on or not -
DEBUG_MAX_ENTRIES
Maximum number of debug entries to hold -
JSR160_PROXY_ALLOWED_TARGETS
Path to a white list of patterns which are matched against possible JMX service URL for incoming requests -
LOGHANDLER_CLASS
Log handler class to use, which must have an empty constructor. If not set, then a default logging mechanism is used. -
LOGHANDLER_NAME
Log handler name to use. It's often called log category. If not set,org.jolokiais used. -
MAX_DEPTH
Maximum traversal depth for serialization of complex objects. -
MAX_COLLECTION_SIZE
Maximum size of collections returned during serialization. If larger, the collection is truncated -
MAX_OBJECTS
Maximum number of objects returned by serialization -
SERIALIZE_LONG
How to serialize long values: "number" or "string" -
RESTRICTOR_CLASS
Custom restrictor to be used instead of default one -
POLICY_LOCATION
Init parameter for the location of the policy file. This should be an URL pointing to the policy file. If this URL uses a schemeclasspaththen do a class lookup. The URL given can contain also placeholders which gets replaced:- $host or ${host} : Host name (if possible), otherwise address
- $ip or ${ip} : IP Address
- ${prop:foo} : System property foo
- ${env:FOO} : Environment variable FOO
-
ALLOW_DNS_REVERSE_LOOKUP
Whether a reverse DNS lookup is allowed or not. Reverse DNS lookups might happen for checking host based restrictions, but might be costly. -
IGNORE_ERRORS
Runtime configuration (i.e. must come in with a request) for ignoring errors during JMX operations and JSON serialization. This works only for certain operations like pattern reads. -
INCLUDE_STACKTRACE
Whether to include a stack trace in the response when an error occurs. The allowed values are "true" for inclusion, "false" if no stacktrace should be included or "runtime" if onlyRuntimeExceptions should be included. Default is "true" -
SERIALIZE_EXCEPTION
Whether to include a JSON serialized version of the exception. If set to "true", the exception is added under the key "error_value" in the response. Default is false. -
ALLOW_ERROR_DETAILS
Whether expose extended error information like stacktraces or serialized exception at all. INCLUDE_STACKTRACE and SERIALIZE_EXCEPTION take effect only when ALLOW_ERROR_DETAILS is set to true. This could be set to false to avoid exposure of internal data. -
CANONICAL_NAMING
Whether property keys of ObjectNames should be ordered in the canonical way or in the way that they are created. The allowed values are either "true" in which case the canonical key order (== alphabetical sorted) is used or "false" for getting the keys as registered. Default is "true" -
STREAMING
Whether to use streaming json responses. Default is "true" -
MBEAN_QUALIFIER
Optional domain name for registering own MBeans -
CALLBACK
Option which can be given to a request to specify a JSONP callback. The generated answer will be of type text/javascript and it will contain a JavaScript function to be called. -
MIME_TYPE
Mime Type to use for the response value. By default, this istext/plain, but it could be useful to returnapplication/json, too. A request parameter overrides a global configuration. -
IF_MODIFIED_SINCE
For LIST requests, this option can be used to return the result only if they set of registered MBeans has been changed since the timestamp given in this option. The timestamp has to be given in seconds since 1.1.1970 (epoch time). -
PATH_QUERY_PARAM
Query parameter used for providing a path in order to avoid escaping issues. This can be used as an alternative for path notations -
DISCOVERY_ENABLED
Whether to enable listening and responding to discovery multicast requests for discovering agent details. -
DISCOVERY_AGENT_URL
Specify the agent URL to return for an discovery multicast request. If this option is givenDISCOVERY_ENABLEDis set totrueautomatically. The URL given can contain placeholders:- $host or ${host} : Host name (if possible), otherwise address
- $ip or ${ip} : IP Address
- ${prop:foo} : System property foo
- ${env:FOO} : Environment variable FOO
-
MULTICAST_GROUP
IPv4 Address for Jolokia's Multicast group.
To make UDP multicasting work on Linux, make sure firewall is properly configured. On Fedora with default
FedoraServerzone, use:$ firewall-cmd --zone=FedoraServer --add-rich-rule='inet firewalld destination 239.192.48.84 accept'or directly usingnft(chain name may vary):$ nft add rule inet firewalld filter_IN_FedoraServer_allow ip daddr 239.192.48.84 accept -
MULTICAST_PORT
Multicast port where to listen for queries. -
USER
User for authentication purposes. Used by OSGi and JDK agent. -
PASSWORD
Password for authentication purposes. Used by OSGi and JDK agent -
REALM
The security realm used for login -
AUTH_MODE
What authentication to use. Support values: "basic" for basic authentication, "jaas" for JaaS authentication, "delegate" for delegating to another HTTP service. For OSGi agent there are the additional modes "service-all" and "service-any" to use Authenticator services provided via an OSGi service registry. -
AUTH_MATCH
If MultiAuthenticator is used, this config item explains how to combine multiple authenticators Supported values: "any" at least one authenticator must match, "all" all authenticators must match -
AUTH_CLASS
Custom authenticator to be used instead of default user/password one (JVM agent) -
AUTH_URL
URL used for a dispatcher authentication (authMode == delegate) -
AUTH_PRINCIPAL_SPEC
Extractor specification for getting the principal (authMode == delegate) -
AUTH_IGNORE_CERTS
Whether to ignore CERTS when doing a dispatching authentication (authMode == delegate) -
AGENT_CONTEXT
Context used for agent, used e.g. in the OSGi activator (but not for the servlet, this is done in web.xml) -
USE_RESTRICTOR_SERVICE
For OSGi, if set to true, the agent uses a restrictor service when it kicks in, but denies access otherwise. -
LISTEN_FOR_HTTP_SERVICE
Deprecated.option is kept for compatibility reasons, because OSGi servlet is now registered using Servlet Whiteboard pattern. Please useREGISTER_WHITEBOARD_SERVLETBy default, the OSGi Agent listens for an OSGi HttpService to which it will register an agent servlet. Set this to false if you want to instantiate the servlet on your own (either declaratively within another war or programmatically) -
REGISTER_WHITEBOARD_SERVLET
By default, the OSGi Agent uses Whiteboard pattern to register an agent servlet. Set this to false if you want to instantiate and register the servlet on your own. -
HTTP_SERVICE_FILTER
Deprecated.Whiteboard specification can no longer point to specific HttpService implementation.By default, the OSGi Agent will bind to all HttpService implementations. Set this to control which of the implementations of HttpService are bound to.The syntax is that of the standard OSGi Filter.
(VirtualServer=__asadmin) --> Glassfish 3+ administration server onlyNote this will be combined with the objectClass filter for HttpService with the and (&) operator.
-
DETECTOR_OPTIONS
Extra options passed to a server handle after it has been detected. The value must be a JSON object with the product name as key and another JSON object as value containing the specific handle configuration. E.g.{ "glassfish" : { "bootAmx" : true}, "jboss" : { "disableWorkaround" : true} } -
AGENT_ID
The ID to uniquely identify this agent within a JVM. There can be multiple agents registered a JVM. This id is e.g. used to uniquely create MBean names. -
AGENT_TYPE
The agent type holds the information which kind of agent (war,jvm,osgi) is in use. This configuration cannot be set from the outside but is written by the agent itself -
AGENT_DESCRIPTION
A description which can be used to describe the agent further. Typically this can be used by clients to provide additional information to the user.
-
-
Field Details
-
JAAS_SUBJECT_REQUEST_ATTRIBUTE
JAAS Subject to attach to an HTTP request as attribute if JAAS based authentication is in use. This constant can only be used programtically- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
toString
-
getGlobalConfigKey
Get the configuration key for a global configuration- Parameters:
pKeyS- the key to lookup- Returns:
- the key or null if the key is not known or is not a global key
-
getRequestConfigKey
Get the configuration key for a request configuration- Parameters:
pKeyS- the key to lookup- Returns:
- the key or null if the key is not known or is not a request key
-
getKeyValue
Get the string value of a key- Returns:
- string value of a key
-
getDefaultValue
Get the default value- Returns:
- the default value of a key
-
isGlobalConfig
public boolean isGlobalConfig()Whether this key is a global configuration key- Returns:
- true if this is a global configuration key
-
isRequestConfig
public boolean isRequestConfig()Whether this key is a request configuration key- Returns:
- true if this is a request configuration key
-
asSystemProperty
Get the value of this key as it could be possibly used as a system property toSystem.getProperty(String). Note, that only a few config values can be set that way- Returns:
- key, pefixed with "jolokia."
-
asEnvVariable
Get the value of this key as it could be possibly used as an environment variable inSystem.getenv(String). Note, that only a few config values can be set that way.- Returns:
- key, pefixed with "jolokia."
-