Package rsp

Class AppConfig


  • public final class AppConfig
    extends Object
    An application configuration.
    • Field Detail

      • LOG_LEVEL_PROPERTY_NAME

        public static final String LOG_LEVEL_PROPERTY_NAME
        The application's internal log level system property name, "rsp.log.level", Log.Level, the log level name can be provided in a lower or upper case. If log levels do not have a constant with a matching name, an IllegalArgumentException will be thrown on initialization. If no such property provided then a default log level will be used DEFAULT_LOG_LEVEL.
        See Also:
        Constant Field Values
      • DEFAULT_LOG_LEVEL

        public static final Log.Level DEFAULT_LOG_LEVEL
        The default log level
      • DEFAULT_CONSOLE_LOG

        public static final Log.Reporting DEFAULT_CONSOLE_LOG
        A console logger used by default
      • DEFAULT_HEARTBEAT_INTERVAL_MS

        public static final int DEFAULT_HEARTBEAT_INTERVAL_MS
        The default rate of heartbeat messages from a browser to server
        See Also:
        Constant Field Values
      • DEFAULT_SCHEDULER_THREAD_POOL_SIZE

        public static final int DEFAULT_SCHEDULER_THREAD_POOL_SIZE
        The application's scheduler thread pool default size
        See Also:
        Constant Field Values
      • DEFAULT

        public static AppConfig DEFAULT
        The default configuration
      • heartbeatIntervalMs

        public final int heartbeatIntervalMs
        The rate of heartbeat messages from a browser to server
      • schedulerThreadPoolSize

        public final int schedulerThreadPoolSize
        The application's scheduler thread pool size
    • Constructor Detail

      • AppConfig

        public AppConfig​(int heartbeatIntervalMs,
                         int schedulerThreadPoolSize,
                         Log.Reporting log)
        Creates an instance of an application object
        Parameters:
        heartbeatIntervalMs - the rate of heartbeat messages from a browser to server
        schedulerThreadPoolSize - the application's scheduler thread pool size
        log - the application's logger
    • Method Detail

      • heartbeatIntervalMs

        public AppConfig heartbeatIntervalMs​(int heartbeatIntervalMs)
        Creates a new copy of the configuration with a provided heartbeat interval
        Parameters:
        heartbeatIntervalMs - the rate of heartbeat messages from a browser to server
        Returns:
        a new configuration object with the same field values except of the provided field
      • log

        public AppConfig log​(Log.Reporting log)
        Creates a new copy of the configuration with a provided application logger
        Parameters:
        log - the application's logger
        Returns:
        a new configuration object with the same field values except of the provided field