Class Settings

java.lang.Object
net.targetr.wtm3.Settings

public class Settings extends Object
Loads default settings and reads settings from properties files.
Author:
Dr Michael Gardiner
  • Field Details

    • server

      public String server
      The configured server string.
    • port

      public int port
      The listen port.
    • backlog

      public int backlog
      The listen backlog.
    • listenAddr

      public String listenAddr
      The bind address or null for all.
    • instanceId

      public String instanceId
      An instance ID to help identify this server
    • transferBufferSize

      public int transferBufferSize
      Buffer size in bytes used for data transfers.
    • tcpSocketTimeout

      public int tcpSocketTimeout
      Socket read timeout in milliseconds.
    • tcpSocketLingerSeconds

      public int tcpSocketLingerSeconds
      Socket linger timeout in seconds.
    • tcpNoDelay

      public boolean tcpNoDelay
      Disable Nagle's algorithm
    • tcpKeepAlive

      public boolean tcpKeepAlive
      Enable TCP keep alive
    • metaDataRequestTimeout

      public int metaDataRequestTimeout
      Elapsed-time limit in milliseconds checked while reading HTTP metadata.
    • metadataReadBufferSize

      public int metadataReadBufferSize
      Read buffer and size limit in bytes for HTTP request or response metadata.
    • requestBodyMaxSize

      public int requestBodyMaxSize
      Maximum body size in bytes accepted by HttpRequest.getBody().
    • requestBodyTimeout

      public int requestBodyTimeout
      Elapsed-time limit in milliseconds for buffered request-body reads.
    • websocketMaxFrameSize

      public int websocketMaxFrameSize
      Maximum incoming WebSocket frame payload size in bytes.
    • websocketMaxMessageSize

      public int websocketMaxMessageSize
      Maximum assembled incoming WebSocket text message size in bytes.
    • resourceCacheEnabled

      public boolean resourceCacheEnabled
      Enables storing resource-cache entries; disabling does not remove existing entries.
    • sanitizeWebMonitoring

      public boolean sanitizeWebMonitoring
      Applies field-specific redaction to entries sent to monitoring browsers.
    • backgroundMaintenance

      public boolean backgroundMaintenance
      Perform maintenance tasks in the background
    • encourageSecureConnections

      public boolean encourageSecureConnections
      Encourage use of TLS connections by redirecting HTTP traffic to HTTPS
    • sslContext

      public String sslContext
      The SSL Context protocol.
    • sslProtocols

      public String[] sslProtocols
      Enabled TLS protocols; empty retains the socket factory defaults.
    • cipherSuites

      public String[] cipherSuites
      Enabled cipher suites in preference order; empty retains the factory defaults.
    • noSniDomain

      public String noSniDomain
      Domain to assume for clients without SNI.
    • domains

      public String[] domains
      List of domains to create certificates for.
    • keyStorePath

      public String keyStorePath
      Path to keystore.
    • keyStoreType

      public String keyStoreType
      Type of keystore.
    • keyStorePassword

      public String keyStorePassword
      Keystore password.
    • keystoreInternalKeyPassword

      public String keystoreInternalKeyPassword
      Internal keystore key password.
    • selfSignedAlias

      public String selfSignedAlias
      Alias for self signed root.
    • sslSelfSignedRootDn

      public String sslSelfSignedRootDn
      Custom SSL root distinguished name.
    • sslSelfSignedDomainDn

      public String sslSelfSignedDomainDn
      Custom SSL domain distinguished name.
    • errorFormatter

      public HtmlErrorFormatter errorFormatter
      HTML error page formatter.
  • Method Details

    • get

      public static Settings get()
      Gets the singleton Settings instance.
      Returns:
      the singleton Settings
    • load

      public void load(Properties props)
      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.