Package rsp
Class AppConfig
- java.lang.Object
-
- rsp.AppConfig
-
public final class AppConfig extends Object
An application configuration.
-
-
Field Summary
Fields Modifier and Type Field Description static AppConfigDEFAULTThe default configurationstatic Log.ReportingDEFAULT_CONSOLE_LOGA console logger used by defaultstatic intDEFAULT_HEARTBEAT_INTERVAL_MSThe default rate of heartbeat messages from a browser to serverstatic Log.LevelDEFAULT_LOG_LEVELThe default log levelstatic intDEFAULT_SCHEDULER_THREAD_POOL_SIZEThe application's scheduler thread pool default sizeintheartbeatIntervalMsThe rate of heartbeat messages from a browser to serverLog.ReportinglogThe application's loggerstatic StringLOG_LEVEL_PROPERTY_NAMEThe 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.intschedulerThreadPoolSizeThe application's scheduler thread pool size
-
Constructor Summary
Constructors Constructor Description AppConfig(int heartbeatIntervalMs, int schedulerThreadPoolSize, Log.Reporting log)Creates an instance of an application object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AppConfigheartbeatIntervalMs(int heartbeatIntervalMs)Creates a new copy of the configuration with a provided heartbeat intervalAppConfiglog(Log.Reporting log)Creates a new copy of the configuration with a provided application logger
-
-
-
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, anIllegalArgumentExceptionwill be thrown on initialization. If no such property provided then a default log level will be usedDEFAULT_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
-
log
public final Log.Reporting log
The application's logger
-
-
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 serverschedulerThreadPoolSize- the application's scheduler thread pool sizelog- 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
-
-