Package com.iizix.comm
Interface IServerSettings
- All Known Implementing Classes:
- EditorServerSettings,- ServerSettings
public interface IServerSettings
The server settings interface.
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescriptionGets the realm for authentication.- int[]Gets the cache parameters as 3 integers in an array, param[0] is minLength, param[1] is maxLength, param[2] is count.Gets the description of the Server.Gets the configured ports.Gets the file name for the authentication realm properties.Gets the root directory for external files.- intGet the web server maximum thread idle time, default is 60 seconds, 60_000 milliseconds.Gets the logger directory for web server log files.- intGets the number of days to retain web server log files.Gets the time zone ID for logging web server requests.- intGet the web server maximum number of threads, default is 200.- intGet the web server minimum number of threads, default is 8.- intThe return code to use when web server receives HTTP requests to redirect to HTTPS.- intGet the web server number of reserved threads, default to -1.- booleanChecks if basic authentication should be used.- booleanFlag for directory listing allowed.- boolean- useGzip()Flag if Gzip compression should be used in the web server.
- Method Details- getDescriptionString getDescription()Gets the description of the Server.- Returns:
- The description, "IIZI Server" for default.
 
- getCacheParamsint[] 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.
 
- getRootDirectoryString 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 nullif 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.
 
- getWSLogDirectoryGets 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 nullif 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.
 
- getWSLogTimeZoneString getWSLogTimeZone()Gets the time zone ID for logging web server requests.- Returns:
- The Time Zone ID, or GMT (default).
 
- getWSLogsRetainDaysint getWSLogsRetainDays()Gets the number of days to retain web server log files.- Returns:
- The default is 14, set to zero to disable logging.
 
- useGzipboolean useGzip()Flag if Gzip compression should be used in the web server.- Returns:
- true to enable Gzip (default), false otherwise.
 
- getWSMaxThreadsint 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.
 
- getWSMinThreadsint 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.
 
- getWSReservedThreadsint 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.
 
- getWSIdleTimeoutint 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_HTTPSint 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.
 
- getPortConfigurationsIWebServerPortConfig[] getPortConfigurations()Gets the configured ports.- Returns:
- The array of server port configurations.
 
- isDirectoryListingAllowedboolean isDirectoryListingAllowed()Flag for directory listing allowed.- Returns:
- The flag allowing directory listing of the web servers root and subdirectories, default false.
 
- getRealmPropertiesFileNameString getRealmPropertiesFileName()Gets the file name for the authentication realm properties.- Returns:
- The file name, or "authentication-realm-properties.txt" if undefined.
 
- getAuthenticationRealmString getAuthenticationRealm()Gets the realm for authentication.- Returns:
- The realm string, "iiziServer Authentication" if not defined or empty String.
 
- isBasicAuthenticationEnabledboolean isBasicAuthenticationEnabled()Checks if basic authentication should be used.- Returns:
- The flag for authentication enabled.