Enum Class ConfigKey

java.lang.Object
java.lang.Enum<ConfigKey>
org.jolokia.server.core.config.ConfigKey
All Implemented Interfaces:
Serializable, Comparable<ConfigKey>, java.lang.constant.Constable

public enum ConfigKey extends Enum<ConfigKey>
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
  • Enum Constant Details

    • HISTORY_MAX_ENTRIES

      public static final ConfigKey HISTORY_MAX_ENTRIES
      Maximum number of history entries to keep
    • DEBUG

      public static final ConfigKey DEBUG
      Whether debug is switched on or not
    • DEBUG_MAX_ENTRIES

      public static final ConfigKey DEBUG_MAX_ENTRIES
      Maximum number of debug entries to hold
    • JSR160_PROXY_ALLOWED_TARGETS

      public static final ConfigKey JSR160_PROXY_ALLOWED_TARGETS
      Path to a white list of patterns which are matched against possible JMX service URL for incoming requests
    • LOGHANDLER_CLASS

      public static final ConfigKey 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

      public static final ConfigKey LOGHANDLER_NAME
      Log handler name to use. It's often called log category. If not set, org.jolokia is used.
    • MAX_DEPTH

      public static final ConfigKey MAX_DEPTH
      Maximum traversal depth for serialization of complex objects.
    • MAX_COLLECTION_SIZE

      public static final ConfigKey MAX_COLLECTION_SIZE
      Maximum size of collections returned during serialization. If larger, the collection is truncated
    • MAX_OBJECTS

      public static final ConfigKey MAX_OBJECTS
      Maximum number of objects returned by serialization
    • SERIALIZE_LONG

      public static final ConfigKey SERIALIZE_LONG
      How to serialize long values: "number" or "string"
    • RESTRICTOR_CLASS

      public static final ConfigKey RESTRICTOR_CLASS
      Custom restrictor to be used instead of default one
    • POLICY_LOCATION

      public static final ConfigKey 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 scheme classpath then 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

      public static final ConfigKey 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

      public static final ConfigKey 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

      public static final ConfigKey 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 only RuntimeExceptions should be included. Default is "true"
    • SERIALIZE_EXCEPTION

      public static final ConfigKey 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

      public static final ConfigKey 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

      public static final ConfigKey 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

      public static final ConfigKey STREAMING
      Whether to use streaming json responses. Default is "true"
    • MBEAN_QUALIFIER

      public static final ConfigKey MBEAN_QUALIFIER
      Optional domain name for registering own MBeans
    • CALLBACK

      public static final ConfigKey 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

      public static final ConfigKey MIME_TYPE
      Mime Type to use for the response value. By default, this is text/plain, but it could be useful to return application/json, too. A request parameter overrides a global configuration.
    • IF_MODIFIED_SINCE

      public static final ConfigKey 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

      public static final ConfigKey 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

      public static final ConfigKey DISCOVERY_ENABLED
      Whether to enable listening and responding to discovery multicast requests for discovering agent details.
    • DISCOVERY_AGENT_URL

      public static final ConfigKey DISCOVERY_AGENT_URL
      Specify the agent URL to return for an discovery multicast request. If this option is given DISCOVERY_ENABLED is set to true automatically. 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

      public static final ConfigKey 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 FedoraServer zone, use:

           $ firewall-cmd --zone=FedoraServer --add-rich-rule='inet firewalld destination 239.192.48.84 accept'
       
      or directly using nft (chain name may vary):
           $ nft add rule inet firewalld filter_IN_FedoraServer_allow ip daddr 239.192.48.84 accept
       

    • MULTICAST_PORT

      public static final ConfigKey MULTICAST_PORT
      Multicast port where to listen for queries.
    • USER

      public static final ConfigKey USER
      User for authentication purposes. Used by OSGi and JDK agent.
    • PASSWORD

      public static final ConfigKey PASSWORD
      Password for authentication purposes. Used by OSGi and JDK agent
    • REALM

      public static final ConfigKey REALM
      The security realm used for login
    • AUTH_MODE

      public static final ConfigKey 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

      public static final ConfigKey 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

      public static final ConfigKey AUTH_CLASS
      Custom authenticator to be used instead of default user/password one (JVM agent)
    • AUTH_URL

      public static final ConfigKey AUTH_URL
      URL used for a dispatcher authentication (authMode == delegate)
    • AUTH_PRINCIPAL_SPEC

      public static final ConfigKey AUTH_PRINCIPAL_SPEC
      Extractor specification for getting the principal (authMode == delegate)
    • AUTH_IGNORE_CERTS

      public static final ConfigKey AUTH_IGNORE_CERTS
      Whether to ignore CERTS when doing a dispatching authentication (authMode == delegate)
    • AGENT_CONTEXT

      public static final ConfigKey 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

      public static final ConfigKey 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 public static final ConfigKey LISTEN_FOR_HTTP_SERVICE
      Deprecated.
      option is kept for compatibility reasons, because OSGi servlet is now registered using Servlet Whiteboard pattern. Please use REGISTER_WHITEBOARD_SERVLET
      By 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

      public static final ConfigKey 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 public static final ConfigKey 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 only
       

      Note this will be combined with the objectClass filter for HttpService with the and (&) operator.

    • DETECTOR_OPTIONS

      public static final ConfigKey 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

      public static final ConfigKey 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

      public static final ConfigKey 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

      public static final ConfigKey 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

      public static final String 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

      public static ConfigKey[] 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

      public static ConfigKey valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ConfigKey>
    • getGlobalConfigKey

      public static ConfigKey getGlobalConfigKey(String pKeyS)
      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

      public static ConfigKey getRequestConfigKey(String pKeyS)
      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

      public String getKeyValue()
      Get the string value of a key
      Returns:
      string value of a key
    • getDefaultValue

      public String 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

      public String asSystemProperty()
      Get the value of this key as it could be possibly used as a system property to System.getProperty(String). Note, that only a few config values can be set that way
      Returns:
      key, pefixed with "jolokia."
    • asEnvVariable

      public String asEnvVariable()
      Get the value of this key as it could be possibly used as an environment variable in System.getenv(String). Note, that only a few config values can be set that way.
      Returns:
      key, pefixed with "jolokia."