Interface ISettings


  • public interface ISettings
    The exposed API for the Deep settings.
    • Field Detail

      • KEY_AUTH_PROVIDER

        static final String KEY_AUTH_PROVIDER
        This is the settings key for the configured auth provider.
        See Also:
        Constant Field Values
      • KEY_SERVICE_SECURE

        static final String KEY_SERVICE_SECURE
        This is the setting key for the service secure setting.
        See Also:
        Constant Field Values
      • JSP_SUFFIX

        static final String JSP_SUFFIX
        To let us calculate the class and file names for JSP classes we need to know the JSP suffix that is being used by monitored service.

        By default, tomcat take index.jsp and make it into index_jsp.class, but this suffix can be configured.

        See Also:
        Constant Field Values
      • JSP_PACKAGES

        static final String JSP_PACKAGES
        It is possible to put compiled JSP classes into specified packages, some versions put this in a jsp package, some use org.apache.jsp (newer).
        See Also:
        Constant Field Values
      • APP_FRAMES_INCLUDES

        static final String APP_FRAMES_INCLUDES
        Define which packages we should include as being part of your app.
        See Also:
        Constant Field Values
      • APP_FRAMES_EXCLUDES

        static final String APP_FRAMES_EXCLUDES
        Define which packages we should exclude as being part of your app.
        See Also:
        Constant Field Values
    • Method Detail

      • getSettingAs

        <T> T getSettingAs​(String key,
                           Class<T> clazz)
        Get a setting from the config as a given type.

        When reading a config value, deep will scan the config file, system properties and environment variables. We will read the values in order:

        • Environment Variables
        • System Property
        • Config Value
        So a value read from environment variables will override values given as system properties.

        When we read a value we will scope the keys to suit the place from which we are reading. This means that if we are looking for 'service.name' we will use the following keys:

        • DEEP_SERVICE_NAME - When looking in Environment variables we uppercase and use underscores
        • deep.service.name - When looking in System Properties we lowercase and use dots
        • service.name - When looking in config file we use the normalised value
        The key provided should be the normalized key.
        Type Parameters:
        T - the type to return as
        Parameters:
        key - the key for the setting
        clazz - the type to return as
        Returns:
        the value as the given type
      • getMap

        Map<String,​String> getMap​(String key)
        Get the property as a map.
        Parameters:
        key - the for the setting
        Returns:
        the value as a map
      • getAsList

        List<String> getAsList​(String key)
        Get the property as a list.
        Parameters:
        key - for the setting
        Returns:
        the value as a list
      • getResource

        Resource getResource()
        Returns the resource that describes this client.
        Returns:
        the Resource