Package com.iizix.comm
Interface IServerSettings
- All Known Implementing Classes:
EditorServerSettings
,ServerSettings
public interface IServerSettings
The server settings interface.- Author:
- Christopher Mindus
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getAuthenticationRealm()
Gets the realm for authentication.int[]
getCacheParams()
Gets the cache parameters as 3 integers in an array, param[0] is minLength, param[1] is maxLength, param[2] is count.java.lang.String
getDescription()
Gets the description of the Server.IWebServerPortConfig[]
getPortConfigurations()
Gets the configured ports.java.lang.String
getRealmPropertiesFileName()
Gets the file name for the authentication realm properties.java.lang.String
getRootDirectory()
Gets the root directory for external files.int
getWSIdleTimeout()
Get the web server maximum thread idle time, default is 60 seconds, 60_000 milliseconds.int
getWSMaxThreads()
Get the web server maximum number of threads, default is 200.int
getWSMinThreads()
Get the web server minimum number of threads, default is 8.int
getWSReservedThreads()
Get the web server number of reserved threads, default to -1.boolean
isBasicAuthenticationEnabled()
Checks if basic authentication should be used.boolean
isDirectoryListingAllowed()
Flag for directory listing allowed.boolean
useGzip()
Flag if Gzip compression should be used in the web server.
Method Detail
getDescription
java.lang.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
java.lang.String getRootDirectory()
Gets the root directory for external files. If the directory doesn't exist it will be created.- Returns:
- The root directory or "/iiziServer/root" (of the current drive for Windows) 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.
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.
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
java.lang.String getRealmPropertiesFileName()
Gets the file name for the authentication realm properties.- Returns:
- The file name, or "authentication-realm-properties.txt" if undefined.
getAuthenticationRealm
java.lang.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.