Class ServerSettings
- All Implemented Interfaces:
- IServerSettings,- EventListener,- IGProp<GProp<?>[]>,- IPropCnr,- Cloneable
- Direct Known Subclasses:
- EditorServerSettings
- Field SummaryFieldsModifier and TypeFieldDescription- static final StringFlag to allow file upload, default false.- static final StringAuthentication required: basic.- static final StringDefault base name without file extension of the iiziServer configuration file: "config".- static final StringDefault name of the iiziServer configuration file: "config.iiziServer".- static final StringThe extension of the iiziServer configuration file: ".iiziServer".- static final StringDatabase tables auto-creation flag, default true.- static final StringDatabase server auto-start (Derby Database Server running on same machine), default true.- static final StringDatabase directory (local embedded Derby), default "db".- static final StringDatabase server host name or address (remote Derby).- static final StringMaximum age of cached database files: milliseconds.- static final StringMaximum number of cached database files.- static final StringDatabase server port number, default 1527.- static final longDefault maximum age of cached database files: 90 days or 7_776_000_000 milliseconds.- static final intDefault maximum number of cached database files: 10_000.- static final StringThe default directory for the file provider root.- static final intDefault history size = 500.- static final intDefault log level = ILog.INFO.- static final StringDefault log file name.- static final intThe default maximum count of current thumbnail requests to "urlbox.io", default 5.- static final intThe default maximum history size for geolocation entries per user.- static final intDefault max log file size in MB = 50 MB, undefined = unlimited (-1).- static final intDefault value for maximum server key age: 90 days.- static final intDefault maximum upload size: 50 MB.- static final StringThe default server configuration environment.- static final StringDefault directory name for file upload = "uploads";- static final StringProperty name for "directory listing allowed".- static final StringTimeout before an app session is disposed of when no more client sessions are present, default 10 minutes.- static final StringProperty name for external server URL, including protocol and potential port number (if different from protocol port).- static final StringRoot directory relative the server's current directory where to place external files provided for remote usage over the web server.- static final StringThe Gzip boolean setting.- static final StringHeartbeat interval in seconds to keep communication link up, default 45 seconds.- static final StringTimeout before a client session is disposed when it has not processes any transactions, default 2 hours.- static final StringOld log compression: 0=none, 1=gzip (default), 2=xz.- static final StringThe history size.- static final StringLog level.- static final StringLog to console.- static final StringLog file name.- static final StringThe maximum count of current thumbnail requests to "urlbox.io", default 10.- static final StringThe maximum history size for geolocation entries per user.- static final StringMax size of log file before new file.- static final StringMaximum server key age in days: "maxServerKeyAge".- static final StringMaximum upload size in MB.- static final StringThe authentication realm.- static final StringThe file name for authentication realm properties, default "authentication-realm-properties.txt" in the current directory of the server.- static final StringProperty name of "count of strings in transactional cache".- static final StringProperty name of "maximum string length of a transactional cache".- static final StringProperty name of "minimum string length of a transactional cache".- static final StringDirectory name for file upload.- static final StringThe "urlbox.io" API key.- static final StringThe web server maximum thread idle time settings.- static final StringThe web server maximum number of threads setting.- static final StringThe web server minimum number of threads setting.- static final StringThe web server number of reserved threads setting.- Fields inherited from class com.iizix.prop.PropCnr- EMPTY, EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_ID, nameTable- Fields inherited from class com.iizix.prop.GProp- GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2- Fields inherited from interface com.iizix.prop.IGProp- EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
- Constructor SummaryConstructorsConstructorDescriptionCreates the server settings without a name.- ServerSettings- (Atom atom) Creates the server settings with a name.
- Method SummaryModifier and TypeMethodDescription- protected voidAdds the predefined containers for identifications, fields and actions.- clone()Creates a clone out of this property.- protected PolicyProps- createPolicyProps- (Atom atom) Creates a policy property with the specified atom name.Gets the password policy for administrators.Gets 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.- longTimeout before an app session is disposed of when no more client sessions are present, default 10 minutes.- longHeartbeat interval in seconds to keep communication link up, default 45 seconds.- longGets the timeout before a client session is disposed when it has not processes any transactions, default 2 hours.- longGets the maximum file age of cached database files.- intGets the maximum number of cached database files.Gets the default Server configuration environment name.Gets the description of the Server.Gets the external server URL, including protocol and potential port number (if different from protocol port).Gets the root directory relative the server's current directory where to place external files provided for remote usage over the web server.Gets the upload directory where files are placed in a staging area.Gets the Let's Encrypt domains.Gets the log file name.- intGets the history size for events kept in-memory for the server administration program to retrieve.- intGets the log level to use.- booleanLogging output also to console.- getMailSender- (String name, ExecutorService executorService, File baseDir) Gets the mail sender with the specified name.- intThe maximum count of current thumbnail requests to "urlbox.io", default 5.- intGets the maximum number of geolocation entries per user in the history.- longGets the maximum log file size.- intGets the maximum server key age in days.- intReturns the maximum size of any uploaded file in MB.Gets the configured ports.Gets the file name for the authentication realm properties.- getRegionLocationAPIKey- (String providerName) Gets the API key for a region location service provider.- intGets the global cache size for the region location service providers.Gets the root directory for external files.Gets the configuration environment of a name.Gets the array of configuration environments present.Gets the "urlbox.io" API key.Gets the password policy for users.- intGet the web server maximum thread idle time, default is 60 seconds, 60_000 milliseconds.- intGet the web server maximum number of threads, default is 200.- intGet the web server minimum number of threads, default is 8.- intGet the web server number of reserved threads, default to -1.- booleanChecks if basic authentication should be used.- booleanFlag for directory listing allowed.- booleanChecks if file upload is enabled or not.- voidCalled when the application is loaded.- voidCalled when an application is instantiated and started by a user session.- voidCalled when an application is stopped.- voidCalled when the application is unloaded.- protected voidCalled when loaded to update the ServerProps instance.- void- setCacheParams- (int minLength, int maxLength, int count) Sets the parameters for cache: minLength, maxLength, count.- boolean- setDescription- (String descr) Sets the description of the server.- boolean- setExternalHostName- (String extServerURL) Sets the external server URL, including protocol and potential port number (if different from protocol port).- boolean- setRootDirectory- (String root) Sets the root directory for external files.- boolean- useGzip()Flag if Gzip compression should be used in the web server.- boolean- verify- (PropVerification verification) Verifies this property container.- Methods inherited from class com.iizix.prop.PropCnr- __transferChildProps, addProp, addProp, addProp2, addProp2, appendPropValue, canRequestFocus, completeVirtualize, containsProp, containsProp, convertLoadedProp, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, enablePropCommunication, enablePropHashMap, equalsTree, equalsTree, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsContainer, getExtendsError, getExtendsName, getExtendsOverride, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getPredefinedProps, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasFocus, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, initPropCnr, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, isSibling, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropDispose, onPropRemoved, onPropTreeInitialized, onReferenceEvent, onVirtualContainerCreated, onVirtualizationCompleted, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, replaceProps, requestFocus, requestFocus, requestFocusEx, requestFocusEx, resolveReferences, resolveRuntimeReferences, setBool, setBool, setBool, setBool, setCreateRequiredProp, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, shouldCreateProps, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verifyInternalUseOnly, verifyTree, virtualize- Methods inherited from class com.iizix.prop.GProp- addPropError, addPropListener, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, extendsClone, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropPrivateAtCreation, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPrepare, onPropInvalidateCache, onPropParentChanged, onPropValueSet, onRemoteEvent, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warning- Methods inherited from class java.lang.Object- getClass, hashCode, notify, notifyAll, wait, wait, wait- Methods inherited from interface com.iizix.prop.IGProp- addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onEventSelf, onRemoteEvent, removePropError, removePropListener, renameProp, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warning- Methods inherited from interface com.iizix.prop.IPropCnr- canRequestFocus, canRequestFocus, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized
- Field Details- CONFIG_FILE_EXTThe extension of the iiziServer configuration file: ".iiziServer".- See Also:
 
- CONFIG_FILE_DEFAULT_BASE_NAMEDefault base name without file extension of the iiziServer configuration file: "config".- See Also:
 
- CONFIG_FILE_DEFAULT_NAMEDefault name of the iiziServer configuration file: "config.iiziServer".- See Also:
 
- DEFAULT_SERVER_CONFIG_ENVThe default server configuration environment.- See Also:
 
- IDLE_TIMEOUTTimeout before a client session is disposed when it has not processes any transactions, default 2 hours. Range is 2 minutes to 2 days. The idle timeout includes dormant session timeout.- See Also:
 
- DORMANT_TIMEOUTTimeout before an app session is disposed of when no more client sessions are present, default 10 minutes. Range is 30 seconds to 12 hours.- See Also:
 
- HEARTBEAT_INTERVALHeartbeat interval in seconds to keep communication link up, default 45 seconds. Range is 30 seconds to 5 minutes.- See Also:
 
- TRANS_CACHE_MINProperty name of "minimum string length of a transactional cache".- See Also:
 
- TRANS_CACHE_MAXProperty name of "maximum string length of a transactional cache".- See Also:
 
- TRANS_CACHE_COUNTProperty name of "count of strings in transactional cache".- See Also:
 
- EXTERNAL_SERVER_URLProperty name for external server URL, including protocol and potential port number (if different from protocol port).- This setting must be set if the retrieval of the local host name e.g. does not include the domain DNS suffix, or that the name is known on external nets differently than on the internal network. This host name is typically used for the OAuth 2.0 authentication callback URL's. - See Also:
 
- DIR_LISTProperty name for "directory listing allowed".- See Also:
 
- GZIPThe Gzip boolean setting.- See Also:
 
- WS_IDLE_TIMEOUTThe web server maximum thread idle time settings.- See Also:
 
- WS_MAX_THREADSThe web server maximum number of threads setting.- See Also:
 
- WS_MIN_THREADSThe web server minimum number of threads setting.- See Also:
 
- WS_RESERVED_THREADSThe web server number of reserved threads setting.- See Also:
 
- REALMThe authentication realm.- See Also:
 
- REALM_PROPERTIESThe file name for authentication realm properties, default "authentication-realm-properties.txt" in the current directory of the server.- See Also:
 
- AUTH_BASICAuthentication required: basic.- See Also:
 
- MAX_SERVER_KEY_AGEMaximum server key age in days: "maxServerKeyAge".- See Also:
 
- DEFAULT_MAX_SERVER_KEY_AGEpublic static final int DEFAULT_MAX_SERVER_KEY_AGEDefault value for maximum server key age: 90 days.- See Also:
 
- FILE_PROVIDER_ROOTRoot directory relative the server's current directory where to place external files provided for remote usage over the web server.- See Also:
 
- DEFAULT_FILE_PROVIDER_ROOTThe default directory for the file provider root.- See Also:
 
- URLBOX_IO_API_KEYThe "urlbox.io" API key. You will find this key on your Dashboard when you login to "urlbox.io".- See Also:
 
- MAX_CONCURRENT_THUMBNAILS_COUNTThe maximum count of current thumbnail requests to "urlbox.io", default 10.- Be careful not to exceed your quota, there are different plans available. - See Also:
 
- DEFAULT_MAX_CONCURRENT_THUMBNAILS_COUNTpublic static final int DEFAULT_MAX_CONCURRENT_THUMBNAILS_COUNTThe default maximum count of current thumbnail requests to "urlbox.io", default 5.- See Also:
 
- MAX_HISTORY_LOCATIONThe maximum history size for geolocation entries per user.- See Also:
 
- DEFAULT_MAX_HISTORY_LOCATIONpublic static final int DEFAULT_MAX_HISTORY_LOCATIONThe default maximum history size for geolocation entries per user.- See Also:
 
- DB_AUTO_CREATEDatabase tables auto-creation flag, default true.- See Also:
 
- DB_DIRECTORYDatabase directory (local embedded Derby), default "db".- See Also:
 
- DB_HOSTDatabase server host name or address (remote Derby).- See Also:
 
- DB_PORTDatabase server port number, default 1527.- See Also:
 
- DB_AUTO_STARTDatabase server auto-start (Derby Database Server running on same machine), default true.- See Also:
 
- DB_MAX_FILE_COUNTMaximum number of cached database files.- See Also:
 
- DEFAULT_DB_MAX_FILE_COUNTpublic static final int DEFAULT_DB_MAX_FILE_COUNTDefault maximum number of cached database files: 10_000.- See Also:
 
- DB_MAX_FILE_AGEMaximum age of cached database files: milliseconds.- See Also:
 
- DEFAULT_DB_MAX_FILE_AGEpublic static final long DEFAULT_DB_MAX_FILE_AGEDefault maximum age of cached database files: 90 days or 7_776_000_000 milliseconds.- See Also:
 
- LOGFILE_NAMELog file name.- See Also:
 
- DEFAULT_LOGFILE_NAMEDefault log file name.- See Also:
 
- MAX_LOGFILE_SIZEMax size of log file before new file.- See Also:
 
- DEFAULT_MAX_LOGFILE_SIZEpublic static final int DEFAULT_MAX_LOGFILE_SIZEDefault max log file size in MB = 50 MB, undefined = unlimited (-1).- See Also:
 
- LOG_LEVELLog level.- See Also:
 
- DEFAULT_LOG_LEVELpublic static final int DEFAULT_LOG_LEVELDefault log level = ILog.INFO.- See Also:
 
- LOG_TO_CONSOLELog to console.- See Also:
 
- LOG_HISTORY_SIZEThe history size.- See Also:
 
- LOG_COMPRESSOld log compression: 0=none, 1=gzip (default), 2=xz.- See Also:
 
- DEFAULT_LOG_HISTORY_SIZEpublic static final int DEFAULT_LOG_HISTORY_SIZEDefault history size = 500.- See Also:
 
- ALLOW_UPLOADFlag to allow file upload, default false.- See Also:
 
- MAX_UPLOAD_SIZEMaximum upload size in MB.- See Also:
 
- DEFAULT_MAX_UPLOAD_SIZEpublic static final int DEFAULT_MAX_UPLOAD_SIZEDefault maximum upload size: 50 MB.- See Also:
 
- UPLOAD_DIRECTORYDirectory name for file upload.- See Also:
 
- DEFAULT_UPLOAD_DIRECTORYDefault directory name for file upload = "uploads";- See Also:
 
 
- Constructor Details- ServerSettingspublic ServerSettings()Creates the server settings without a name. The name must be set in all cases using the- setPropertyAtomcall.
- ServerSettingsCreates the server settings with a name.- Parameters:
- atom- The name of the property.
 
 
- Method Details- addPredefinedPropsAdds the predefined containers for identifications, fields and actions. This method is overridden fully by the Editor versions of the class.- Overrides:
- addPredefinedPropsin class- PropCnr
- Throws:
- PropException- for property exceptions.
 
- cloneCreates a clone out of this property. The cloning is overridden by the subclasses in order to handle cloning of its class variables appropriately.
- getDescriptionGets the description of the Server.- Specified by:
- getDescriptionin interface- IServerSettings
- Returns:
- The description, "iiziServer" for default.
 
- setDescriptionSets the description of the server.- Parameters:
- descr- New server description, non-null.
- Throws:
- NullPointerException- if- descrif- null.
 
- getLogFileNameGets the log file name.- Returns:
- The log file name, default "logs/server.log".
 
- getMaximumLogFileSizepublic long getMaximumLogFileSize()Gets the maximum log file size.- Returns:
- The maximum log file size, zero for no maximum.
 
- getLogLevelpublic int getLogLevel()Gets the log level to use.- Returns:
- The log level as defined in ILogILog.SEVEREILog.FINEST
 
- getLogToConsolepublic boolean getLogToConsole()Logging output also to console.- Returns:
- true to write log to console as well as to log file, default true.
 
- getLogHistorySizepublic int getLogHistorySize()Gets the history size for events kept in-memory for the server administration program to retrieve.- Returns:
- The number of events, minimum 100, maximum 5000, default 500.
 
- getAdministratorPasswordPolicyGets the password policy for administrators.- Returns:
- The password policy settings for administrators.
 
- getUserPasswordPolicyGets the password policy for users.- Returns:
- The password policy settings for normal users.
 
- createPolicyPropsCreates a policy property with the specified atom name.- Parameters:
- atom- The atom name.
- Returns:
- The policy property.
 
- setExternalHostNameSets the external server URL, including protocol and potential port number (if different from protocol port).- This setting must be set if the retrieval of the local host name e.g. does not include the domain DNS suffix, or that the name is known on external nets differently than on the internal network. This host name is typically used for the OAuth 2.0 authentication callback URL's. - Parameters:
- extServerURL- The URL to use.
- Returns:
- true when this property container has been changed, false otherwise (or for error).
- Throws:
- NullPointerException- If extHostName is null.
- IllegalArgumentException- If extHostName is empty or not valid.
 
- getExternalHostNameGets the external server URL, including protocol and potential port number (if different from protocol port).- This setting must be set if the retrieval of the local host name e.g. does not include the domain DNS suffix, or that the name is known on external nets differently than on the internal network. This host name is typically used for the OAuth 2.0 authentication callback URL's. - Returns:
- The URL, or null for none.
 
- setRootDirectorySets the root directory for external files. This call is done from a server instance when e.g. the command line overrides the default root in the settings.- Parameters:
- root- The new root.
- Returns:
- true when this property container has been changed, false otherwise (or for error).
- Throws:
- IOException- If the directory does not exist.
 
- getRootDirectoryGets the root directory for external files. If the directory doesn't exist it will be created.- Specified by:
- getRootDirectoryin interface- IServerSettings
- 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.
 
- isDirectoryListingAllowedpublic boolean isDirectoryListingAllowed()Flag for directory listing allowed.- Specified by:
- isDirectoryListingAllowedin interface- IServerSettings
- Returns:
- The flag allowing directory listing of the web servers root and subdirectories, default false.
 
- useGzippublic boolean useGzip()Flag if Gzip compression should be used in the web server.- Specified by:
- useGzipin interface- IServerSettings
- Returns:
- true to enable Gzip (default), false otherwise.
 
- getWSMaxThreadspublic 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.- Specified by:
- getWSMaxThreadsin interface- IServerSettings
- Returns:
- The maximum number of threads.
 
- getWSMinThreadspublic 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.- Specified by:
- getWSMinThreadsin interface- IServerSettings
- Returns:
- Minimum number of threads.
 
- getWSReservedThreadspublic 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.- Specified by:
- getWSReservedThreadsin interface- IServerSettings
- Returns:
- Number of reserved threads or -1 for heuristically determined.
 
- getWSIdleTimeoutpublic 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.- Specified by:
- getWSIdleTimeoutin interface- IServerSettings
- Returns:
- Max idle time in ms.
 
- getFileProviderRootGets the root directory relative the server's current directory where to place external files provided for remote usage over the web server.- Returns:
- The root directory name, relative (or absolute path), "wsfiles" as default.
 
- getRealmPropertiesFileNameGets the file name for the authentication realm properties.- Specified by:
- getRealmPropertiesFileNamein interface- IServerSettings
- Returns:
- The file name, or "authentication-realm-properties.txt" if undefined.
 
- getAuthenticationRealmGets the realm for authentication.- Specified by:
- getAuthenticationRealmin interface- IServerSettings
- Returns:
- The realm string, "iiziServer Authentication" if not defined or empty String.
 
- isBasicAuthenticationEnabledpublic boolean isBasicAuthenticationEnabled()Checks if basic authentication should be used.- Specified by:
- isBasicAuthenticationEnabledin interface- IServerSettings
- Returns:
- The flag for authentication enabled.
 
- getUrlboxIOAPIKeyGets the "urlbox.io" API key.- You will find this key on your Dashboard when you login to "urlbox.io". - Returns:
- The configured API key, empty string for none.
 
- getMaxConcurrentThumbnailsRequestspublic int getMaxConcurrentThumbnailsRequests()The maximum count of current thumbnail requests to "urlbox.io", default 5.- Be careful not to exceed your quota, there are different plans available. 
- isFileUploadEnabledpublic boolean isFileUploadEnabled()Checks if file upload is enabled or not.- Returns:
- The upload enablement flag, false by default.
 
- getMaximumUploadFileSizepublic int getMaximumUploadFileSize()Returns the maximum size of any uploaded file in MB.- Returns:
- The file size in MB, default 50 MB.
 
- getFileUploadStagingDirectoryGets the upload directory where files are placed in a staging area.- Returns:
- The directory name, relative the server's current directory.
 
- getMaximumGeolocationHistorySizePerUserpublic int getMaximumGeolocationHistorySizePerUser()Gets the maximum number of geolocation entries per user in the history.- Returns:
- The maximum number of locations, default 100, minimum 10, maximum 10000.
 
- getClientIdleTimeoutpublic long getClientIdleTimeout()Gets the timeout before a client session is disposed when it has not processes any transactions, default 2 hours. Range is 2 minutes to 2 days. The idle timeout includes dormant session timeout.- Returns:
- Value in milliseconds.
 
- getClientDormantTimeoutpublic long getClientDormantTimeout()Timeout before an app session is disposed of when no more client sessions are present, default 10 minutes. Range is 30 seconds to 12 hours.- Returns:
- Value in milliseconds.
 
- getClientHeartBeatIntervalpublic long getClientHeartBeatInterval()Heartbeat interval in seconds to keep communication link up, default 45 seconds. Range is 30 seconds to 5 minutes.- Returns:
- Value in milliseconds (between 45_000L and 300_000L).
 
- getMaximumServerKeyAgepublic int getMaximumServerKeyAge()Gets the maximum server key age in days.- Returns:
- A value between 7 and 365 in days.
 
- setCacheParamspublic void setCacheParams- (int minLength, int maxLength, int count) Sets the parameters for cache: minLength, maxLength, count.- Parameters:
- minLength- The minimum length for caching, 7 is the smallest value.
- maxLength- The maximum length for caching, normally 80 or so (maximum 1024).
- count- The count should normally be larger than 200 and smaller than 1000 (maximum 2048).
- Throws:
- IllegalArgumentException- If arguments are not valid.
 
- getCacheParamspublic 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. - Specified by:
- getCacheParamsin interface- IServerSettings
- Returns:
- Array of 3 integer parameters, param[0] is minLength, param[1] is maxLength, param[2] is count.
 
- getPortConfigurationsGets the configured ports.- Specified by:
- getPortConfigurationsin interface- IServerSettings
- Returns:
- The array of server port configurations.
 
- getLetsEncryptDomainsGets the Let's Encrypt domains.- Returns:
- The array of Let's Encrypt domains.
 
- getDefaultServerConfigurationEnvironmentNameGets the default Server configuration environment name.- Returns:
- The defined default Server configuration environment name, or "default" if such definition is not done.
 
- getServerConfigEnvironmentGets the configuration environment of a name.- Parameters:
- name- The name (e.g. "test", "development" or "production"), or null for default configuration environment name.
- Returns:
- The configuration setup, or null if not found.
 
- getServerConfigEnvironmentsGets the array of configuration environments present.
- onServerSettingsChangedprotected void onServerSettingsChanged()Called when loaded to update the ServerProps instance.
- getDBCacheMaxFileCountpublic int getDBCacheMaxFileCount()Gets the maximum number of cached database files.- Returns:
- Maximum number of files, minimum 100, default 10_000.
 
- getDBCacheMaxFileAgepublic long getDBCacheMaxFileAge()Gets the maximum file age of cached database files.- Returns:
- Maximum age in milliseconds of files: minimum 1 hour, default 90 days.
 
- verifyVerifies this property container. The check performed is the extension of classes and that no circular reference is present.
- onApplicationLoadCalled when the application is loaded.- Parameters:
- app- The application factory.
- Throws:
- ServerApplicationSetupException- For setup exceptions.
 
- onApplicationUnloadCalled when the application is unloaded.- Parameters:
- app- The application begin unloaded.
 
- onApplicationSessionStartedCalled when an application is instantiated and started by a user session.
- onApplicationSessionStoppedCalled when an application is stopped.
- getMailSenderpublic MailSender getMailSender- (String name, ExecutorService executorService, File baseDir) throws NotFoundException, AddressException, NoSuchProviderException, IOException Gets the mail sender with the specified name.- Parameters:
- name- The mail properties name,- nullfor default.
- executorService- The executor service.
- baseDir- The base directory where the server is (generally current directory).
- Returns:
- The mail sender.
- Throws:
- NotFoundException- If the mail sender is not found.
- IOException- If the mail queue directory does not exist.
- NoSuchProviderException- If the "smtp" or "smtps" providers do not exist!
- AddressException- If the default sender failed to parse.
 
- getRegionLocationGlobalCacheSizepublic int getRegionLocationGlobalCacheSize()Gets the global cache size for the region location service providers.- Returns:
- A value between 100 and 100_000, default is 20_000.
 
- getRegionLocationAPIKeyGets the API key for a region location service provider.- Parameters:
- providerName- The provider name, e.g. "IPStack.com".
- Returns:
- The API key, or null if not configured.