Interface IServerSettings

All Known Implementing Classes:
EditorServerSettings, ServerSettings

public interface IServerSettings
The server settings interface.
Author:
Christopher Mindus
  • Method Details

    • getDescription

      String getDescription()
      Gets the description of the Server.
      Returns:
      The description, "IIZI Server" for default.
    • getCacheParams

      int[] getCacheParams()
      Gets the cache parameters as 3 integers in an array, param[0] is minLength, param[1] is maxLength, param[2] is count.

      The default values are minLength=7, maxLength=80, count=700 if nothing is specified.

      Returns:
      Array of 3 integer parameters, param[0] is minLength, param[1] is maxLength, param[2] is count.
    • getRootDirectory

      String getRootDirectory()
      Gets the root directory for external files. If the directory doesn't exist it will be created.
      Returns:
      The root directory or "./root" if none is specified. The return String is null if the directory cannot be created if not present, or the root is not a readable and writable directory. At the same time, logging will occur.
    • getWSLogDirectory

      String getWSLogDirectory() throws IOException
      Gets the logger directory for web server log files. If the directory doesn't exist it will be created.
      Returns:
      The root directory or "./logs/web" if none is specified. The return String is null if the directory cannot be created if not present, or the root is not a readable and writable directory. At the same time, logging will occur.
      Throws:
      IOException - In case the web server log directory is not valid or cannot be created.
    • getWSLogTimeZone

      String getWSLogTimeZone()
      Gets the time zone ID for logging web server requests.
      Returns:
      The Time Zone ID, or GMT (default).
    • getWSLogsRetainDays

      int getWSLogsRetainDays()
      Gets the number of days to retain web server log files.
      Returns:
      The default is 14, set to zero to disable logging.
    • useGzip

      boolean useGzip()
      Flag if Gzip compression should be used in the web server.
      Returns:
      true to enable Gzip (default), false otherwise.
    • getWSMaxThreads

      int getWSMaxThreads()
      Get the web server maximum number of threads, default is 200. Range is 20 to 1024, always larger or equal to the minimum threads. An out-of-range value will give the default.
      Returns:
      The maximum number of threads.
    • getWSMinThreads

      int getWSMinThreads()
      Get the web server minimum number of threads, default is 8. Range is 20 to 1024, always smaller or equal to the minimum threads. An out-of-range value will give the default.
      Returns:
      Minimum number of threads.
    • getWSReservedThreads

      int getWSReservedThreads()
      Get the web server number of reserved threads, default to -1. Range is -1, or 8-64. An out-of-range value will give the default -1.
      Returns:
      Number of reserved threads or -1 for heuristically determined.
    • getWSIdleTimeout

      int getWSIdleTimeout()
      Get the web server maximum thread idle time, default is 60 seconds, 60_000 milliseconds. Range is 5_000 (5 seconds) to 300_000 (5 minutes). An out-of-range value will give the default.
      Returns:
      Max idle time in ms.
    • getWSRedirectCodeHTTP_to_HTTPS

      int getWSRedirectCodeHTTP_to_HTTPS()
      The return code to use when web server receives HTTP requests to redirect to HTTPS. Can be 0 = no redirection, 301 = moved permanently, 302 = moved temporarily (default).
      Returns:
      A return code of 0, 301 or 302.
    • getPortConfigurations

      IWebServerPortConfig[] getPortConfigurations()
      Gets the configured ports.
      Returns:
      The array of server port configurations.
    • isDirectoryListingAllowed

      boolean isDirectoryListingAllowed()
      Flag for directory listing allowed.
      Returns:
      The flag allowing directory listing of the web servers root and subdirectories, default false.
    • getRealmPropertiesFileName

      String getRealmPropertiesFileName()
      Gets the file name for the authentication realm properties.
      Returns:
      The file name, or "authentication-realm-properties.txt" if undefined.
    • getAuthenticationRealm

      String getAuthenticationRealm()
      Gets the realm for authentication.
      Returns:
      The realm string, "iiziServer Authentication" if not defined or empty String.
    • isBasicAuthenticationEnabled

      boolean isBasicAuthenticationEnabled()
      Checks if basic authentication should be used.
      Returns:
      The flag for authentication enabled.