Package net.targetr.wtm3
Class Settings
java.lang.Object
net.targetr.wtm3.Settings
Loads default settings and reads settings from properties files.
- Author:
- Dr Michael Gardiner
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanPerform maintenance tasks in the backgroundintThe listen backlog.String[]Enabled cipher suites in preference order; empty retains the factory defaults.String[]List of domains to create certificates for.booleanEncourage use of TLS connections by redirecting HTTP traffic to HTTPSHTML error page formatter.An instance ID to help identify this serverInternal keystore key password.Keystore password.Path to keystore.Type of keystore.The bind address or null for all.intRead buffer and size limit in bytes for HTTP request or response metadata.intElapsed-time limit in milliseconds checked while reading HTTP metadata.Domain to assume for clients without SNI.intThe listen port.intMaximum body size in bytes accepted by HttpRequest.getBody().intElapsed-time limit in milliseconds for buffered request-body reads.booleanEnables storing resource-cache entries; disabling does not remove existing entries.booleanApplies field-specific redaction to entries sent to monitoring browsers.Alias for self signed root.The configured server string.The SSL Context protocol.String[]Enabled TLS protocols; empty retains the socket factory defaults.Custom SSL domain distinguished name.Custom SSL root distinguished name.booleanEnable TCP keep alivebooleanDisable Nagle's algorithmintSocket linger timeout in seconds.intSocket read timeout in milliseconds.intBuffer size in bytes used for data transfers.intMaximum incoming WebSocket frame payload size in bytes.intMaximum assembled incoming WebSocket text message size in bytes. -
Method Summary
Modifier and TypeMethodDescriptionstatic Settingsget()Gets the singleton Settings instance.voidload(Properties props) Loads supported property values, resetting absent properties to defaults.
-
Field Details
-
server
The configured server string. -
port
public int portThe listen port. -
backlog
public int backlogThe listen backlog. -
listenAddr
The bind address or null for all. -
instanceId
An instance ID to help identify this server -
transferBufferSize
public int transferBufferSizeBuffer size in bytes used for data transfers. -
tcpSocketTimeout
public int tcpSocketTimeoutSocket read timeout in milliseconds. -
tcpSocketLingerSeconds
public int tcpSocketLingerSecondsSocket linger timeout in seconds. -
tcpNoDelay
public boolean tcpNoDelayDisable Nagle's algorithm -
tcpKeepAlive
public boolean tcpKeepAliveEnable TCP keep alive -
metaDataRequestTimeout
public int metaDataRequestTimeoutElapsed-time limit in milliseconds checked while reading HTTP metadata. -
metadataReadBufferSize
public int metadataReadBufferSizeRead buffer and size limit in bytes for HTTP request or response metadata. -
requestBodyMaxSize
public int requestBodyMaxSizeMaximum body size in bytes accepted by HttpRequest.getBody(). -
requestBodyTimeout
public int requestBodyTimeoutElapsed-time limit in milliseconds for buffered request-body reads. -
websocketMaxFrameSize
public int websocketMaxFrameSizeMaximum incoming WebSocket frame payload size in bytes. -
websocketMaxMessageSize
public int websocketMaxMessageSizeMaximum assembled incoming WebSocket text message size in bytes. -
resourceCacheEnabled
public boolean resourceCacheEnabledEnables storing resource-cache entries; disabling does not remove existing entries. -
sanitizeWebMonitoring
public boolean sanitizeWebMonitoringApplies field-specific redaction to entries sent to monitoring browsers. -
backgroundMaintenance
public boolean backgroundMaintenancePerform maintenance tasks in the background -
encourageSecureConnections
public boolean encourageSecureConnectionsEncourage use of TLS connections by redirecting HTTP traffic to HTTPS -
sslContext
The SSL Context protocol. -
sslProtocols
Enabled TLS protocols; empty retains the socket factory defaults. -
cipherSuites
Enabled cipher suites in preference order; empty retains the factory defaults. -
noSniDomain
Domain to assume for clients without SNI. -
domains
List of domains to create certificates for. -
keyStorePath
Path to keystore. -
keyStoreType
Type of keystore. -
keyStorePassword
Keystore password. -
keystoreInternalKeyPassword
Internal keystore key password. -
selfSignedAlias
Alias for self signed root. -
sslSelfSignedRootDn
Custom SSL root distinguished name. -
sslSelfSignedDomainDn
Custom SSL domain distinguished name. -
errorFormatter
HTML error page formatter.
-
-
Method Details
-
get
Gets the singleton Settings instance.- Returns:
- the singleton Settings
-
load
Loads supported property values, resetting absent properties to defaults. TLS protocol/cipher overrides and the error formatter are configured directly in Java.- Parameters:
props- A properties object to read values from.
-