IServletSystemProperties.java

package server.restful.common;

import static java.lang.Boolean.parseBoolean;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.String.valueOf;
import static java.lang.System.getProperty;

public interface IServletSystemProperties {

    interface JSIDPlay2Server {

        /**
         * JSIDPlay2Server Socket connection timeout in ms of the HTTP(s) connection (default: 20s)
         *
         * @jsidplay2.systemProperty jsidplay2.connection.timeout
         */
        int CONNECTION_TIMEOUT = parseInt(getProperty("jsidplay2.connection.timeout", "20000"));

        /**
         * JSIDPlay2Server uses HTTP/2 (or HTTP/1.1) protocol (default: true)
         *
         * @jsidplay2.systemProperty jsidplay2.protocol.h2.enable
         */
        boolean USE_HTTP2 = parseBoolean(getProperty("jsidplay2.protocol.h2.enable", "true"));

        /**
         * The time, in milliseconds, that Tomcat will wait for additional data when a partial HTTP/2 frame has been
         * received (default: 10min). Negative values will be treated as an infinite timeout
         *
         * @jsidplay2.systemProperty jsidplay2.protocol.h2.read.timeout
         */
        int HTTP2_READ_TIMEOUT = parseInt(getProperty("jsidplay2.protocol.h2.read.timeout", valueOf(10 * 60 * 1000)));

        /**
         * The time, in milliseconds, that Tomcat will wait to write additional data when an HTTP/2 frame has been
         * partially written (default: 60min). Negative values will be treated as an infinite timeout
         *
         * @jsidplay2.systemProperty jsidplay2.protocol.h2.write.timeout
         */
        int HTTP2_WRITE_TIMEOUT = parseInt(getProperty("jsidplay2.protocol.h2.write.timeout", valueOf(60 * 60 * 1000)));

        /**
         * The time, in milliseconds, that Tomcat will wait between HTTP/2 frames when there is no active Stream before
         * closing the connection (default: 60min). Negative values will be treated as an infinite timeout
         *
         * @jsidplay2.systemProperty jsidplay2.protocol.h2.keepalive.timeout
         */
        int HTTP2_KEEP_ALIVE_TIMEOUT = parseInt(
                getProperty("jsidplay2.protocol.h2.keepalive.timeout", valueOf(60 * 60 * 1000)));

        /**
         * The HTTP/2 protocol may use compression in an attempt to save server bandwidth (default: on). The acceptable
         * values for the parameter are "off" (disable compression), "on" (allow compression, which causes text data to
         * be compressed), "force" (forces compression in all cases), or a numerical integer value (which is equivalent
         * to "on", but specifies the minimum amount of data before the output is compressed). If the content-length is
         * not known and compression is set to "on" or more aggressive, the output will also be compressed. If not
         * specified, this attribute is set to "off".
         * <p>
         * Note: There is a tradeoff between using compression (saving your bandwidth) and using the sendfile feature
         * (saving your CPU cycles). If the connector supports the sendfile feature, e.g., the NIO2 connector, using
         * sendfile will take precedence over compression. The symptoms will be that static files greater than 48 Kb
         * will be sent uncompressed. You can turn off sendfile by setting useSendfile attribute of the protocol, as
         * documented below, or change the sendfile usage threshold in the configuration of the DefaultServlet in the
         * default conf/web.xml or in the web.xml of your web application
         *
         * @jsidplay2.systemProperty jsidplay2.protocol.h2.compression
         */
        String COMPRESSION = getProperty("jsidplay2.protocol.h2.compression", "on");

        /**
         * Use this boolean attribute to enable or disable sendfile capability (default: false). The default value is
         * true.
         * <p>
         * This setting is ignored, and the sendfile capability disabled, if the useAsyncIO attribute of the associated
         * Connector is set to false.
         * <p>
         * The HTTP/2 sendfile capability uses MappedByteBuffer, which is known to cause file locking on Windows
         *
         * @jsidplay2.systemProperty jsidplay2.protocol.h2.sendfile
         */
        boolean HTTP2_USE_SENDFILE = parseBoolean(getProperty("jsidplay2.protocol.h2.sendfile", "false"));

        /**
         * The factor to apply when counting overhead frames to determine if a connection has too high an overhead and
         * should be closed (default: 10). The overhead count starts at -10 * overheadCountFactor. The count is
         * decreased by 20 for each data frame sent or received and each header frame received. The count is increased
         * by the overheadCountFactor for each setting received, priority frame received, and ping received. If the
         * overhead count exceeds zero, the connection is closed. A value of less than 1 disables this protection. In
         * normal usage a value of approximately 20 or higher will close the connection before any streams can complete.
         * If not specified, a default value of 10 will be used
         *
         * @jsidplay2.systemProperty jsidplay2.protocol.h2.overhead.count.factor
         */
        int HTTP2_OVERHEAD_COUNT_FACTOR = parseInt(
                getProperty("jsidplay2.protocol.h2.overhead.count.factor", valueOf(10)));

        /**
         * The threshold below which the average payload size of the current and previous non-final DATA frames will
         * trigger an increase in the overhead count (see overheadCountFactor, default: 1024). The overhead count will
         * be increased by overheadDataThreshold/average so that the smaller the average, the greater the increase in
         * the overhead count. A value of zero or less disables the checking of non-final DATA frames. If not specified,
         * a default value of 1024 will be used
         *
         * @jsidplay2.systemProperty jsidplay2.protocol.h2.overhead.data.threshold
         */
        int HTTP2_OVERHEAD_DATA_THRESHOLD = parseInt(
                getProperty("jsidplay2.protocol.h2.overhead.data.threshold", valueOf(1024)));

        /**
         * The threshold below which the average size of current and previous WINDOW_UPDATE frame will trigger an
         * increase in the overhead count (see overheadCountFactor, default: 1024). The overhead count will be increased
         * by overheadWindowUpdateThreshold/average so that the smaller the average, the greater the increase in the
         * overhead count. A value of zero or less disables the checking of WINDOW_UPDATE frames. If not specified, a
         * default value of 1024 will be used
         *
         * @jsidplay2.systemProperty jsidplay2.protocol.h2.overhead.window.update.threshold
         */
        int HTTP2_OVERHEAD_WINDOW_UPDATE_THRESHOLD = parseInt(
                getProperty("jsidplay2.protocol.h2.overhead.window.update.threshold", valueOf(1024)));

        /**
         * CPU monitoring default refresh interval in ms (0 means disable, default: 1s)
         *
         * @jsidplay2.systemProperty jsidplay2.monitoring_refresh_interval
         */
        int MONITORING_THREAD_REFRESH_INTERVAL = parseInt(getProperty("jsidplay2.monitoring_refresh_interval", "1000"));

        /**
         * Server base (default: <a href="http://127.0.0.1:8080">http://127.0.0.1:8080</a>)
         *
         * @jsidplay2.systemProperty jsidplay2.base.url
         */
        String BASE_URL = getProperty("jsidplay2.base.url", "http://127.0.0.1:8080");

        /**
         * Servlet response header to set the maximum age of cacheable resources in s (default: public, max-age=604800)
         *
         * <ul>
         *   <li>86400 - 1 Tag
         *   <li>604800 - 1 Woche
         *   <li>31536000 - 1 Jahr
         * </ul>
         *
         * @jsidplay2.systemProperty jsidplay2.cache_control.response.header.cached
         */
        String CACHE_CONTROL_RESPONSE_HEADER_CACHED = getProperty("jsidplay2.cache_control.response.header.cached",
                "public, max-age=604800");

        /**
         * Servlet response header to disable caching for non-cacheable resources (default: private, no-store, no-cache,
         * must-revalidate)
         *
         * @jsidplay2.systemProperty jsidplay2.cache_control.response.header.uncached
         */
        String CACHE_CONTROL_RESPONSE_HEADER_UNCACHED = getProperty("jsidplay2.cache_control.response.header.uncached",
                "private, no-store, no-cache, must-revalidate");

        /**
         * Show uncaught exceptions with full exception stack trace (default: false)
         *
         * @jsidplay2.systemProperty jsidplay2.uncaught.exceptionhandler.exceptions
         */
        boolean UNCAUGHT_EXCEPTION_HANDLER_EXCEPTIONS = parseBoolean(
                getProperty("jsidplay2.uncaught.exceptionhandler.exceptions", "false"));

        /**
         * Set internal proxies to show the real forwarded IP addresses (default: null - proxies are not involved)
         *
         * @jsidplay2.systemProperty jsidplay2.remoteipvalve.internal.proxies
         */
        String INTERNAL_PROXIES = getProperty("jsidplay2.remoteipvalve.internal.proxies");

    }

    interface Assembly64Servlet {

        /**
         * Private Assembly64 credentials file; only web administrators may use its accounts
         * (default: assembly64-credentials.properties in user.dir, then user.home; home values override duplicates).
         *
         * @jsidplay2.systemProperty jsidplay2.assembly64.credentials
         */
        String DEFAULT_CREDENTIALS_FILE = "assembly64-credentials.properties";
    }

    interface ConvertServlet {

        /**
         * Maximum number of ConvertServlet requests in parallel (default: 20)
         *
         * @jsidplay2.systemProperty jsidplay2.convert.max.parallel
         */
        int MAX_CONVERT_IN_PARALLEL = parseInt(getProperty("jsidplay2.convert.max.parallel", "20"));

        /**
         * ConvertServlet: Asynchronous servlets default timeout in ms (0 means disable, default: 0s)
         *
         * @jsidplay2.systemProperty jsidplay2.convert.async.timeout
         */
        int CONVERT_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.convert.async.timeout", "0"));

        /**
         * Video streaming: Upload for the video creation process, for example, an nginx endpoint (default:
         * rtmp://haendel.ddns.net/live)
         *
         * @jsidplay2.systemProperty jsidplay2.rtmp.upload.url
         */
        String RTMP_UPLOAD_URL = getProperty("jsidplay2.rtmp.upload.url", "rtmp://haendel.ddns.net/live");

        /**
         * Video streaming: RTMP Download for the currently generated video live stream via RTMP protocol (default:
         * rtmp://haendel.ddns.net/live)
         *
         * @jsidplay2.systemProperty jsidplay2.rtmp.external.download.url
         */
        String RTMP_DOWNLOAD_URL = getProperty("jsidplay2.rtmp.external.download.url", "rtmp://haendel.ddns.net/live");

        /**
         * Video streaming: HLS Download for the currently generated video live stream via HLS protocol (default: <a
         * href="http://haendel.ddns.net:90/hls">http://haendel.ddns.net:90/hls</a>)
         *
         * @jsidplay2.systemProperty jsidplay2.hls.external.download.url
         */
        String HLS_DOWNLOAD_URL = getProperty("jsidplay2.hls.external.download.url", "http://haendel.ddns.net:90/hls");

        /**
         * Video download: Maximum length in seconds the video stream can run (default: 15min)
         *
         * @jsidplay2.systemProperty jsidplay2.video.max_seconds
         */
        int MAX_VID_DOWNLOAD_LENGTH = parseInt(getProperty("jsidplay2.video.max_seconds", "900"));

        /**
         * Audio download: Maximum length in seconds the audio stream can run (default: 5min)
         *
         * @jsidplay2.systemProperty jsidplay2.audio.max_seconds
         */
        int MAX_AUD_DOWNLOAD_LENGTH = parseInt(getProperty("jsidplay2.audio.max_seconds", "300"));

        /**
         * Maximum number of ConvertServlet video requests in parallel (default: 10)
         *
         * @jsidplay2.systemProperty jsidplay2.convert.rtmp.max.parallel
         */
        int MAX_CONVERT_RTMP_IN_PARALLEL = parseInt(getProperty("jsidplay2.convert.rtmp.max.parallel", "10"));

        /**
         * Video streaming: Interval between simulated key presses of the space key in s required to watch some demos (0
         * means no key presses, default: 90s)
         *
         * @jsidplay2.systemProperty jsidplay2.rtmp.press_space_intervall
         */
        int PRESS_SPACE_INTERVALL = parseInt(getProperty("jsidplay2.rtmp.press_space_intervall", "90"));

        /**
         * Retry count to wait for the video generation being started (default: 40)
         *
         * @jsidplay2.systemProperty jsidplay2.video.wait.for.retry.count
         */
        int WAIT_FOR_VIDEO_AVAILABLE_RETRY_COUNT = parseInt(getProperty("jsidplay2.video.wait.for.retry.count", "40"));

        /**
         * Time span to wait between HLS keep alive notifications in milliseconds (default: 3s)
         *
         * @jsidplay2.systemProperty jsidplay2.hls.notify.for
         */
        int NOTIFY_FOR_HLS = parseInt(getProperty("jsidplay2.hls.notify.for", "3000"));

        /**
         * Text to speech to announce tunes (default: true)
         *
         * @jsidplay2.systemProperty jsidplay2.audio.text2speech
         */
        boolean TEXT_TO_SPEECH = parseBoolean(getProperty("jsidplay2.audio.text2speech", "true"));

        /**
         * Video streaming: RTMP Live stream created but not yet played will be quit after timeout in s (default: 30s)
         *
         * @jsidplay2.systemProperty jsidplay2.rtmp.not_yet_played.timeout
         */
        int RTMP_NOT_YET_PLAYED_TIMEOUT = parseInt(getProperty("jsidplay2.rtmp.not_yet_played.timeout", "30"));

        /**
         * Video streaming: HLS Live stream created but not yet received keep-alive notification will be quit after
         * timeout in s (default: 15s)
         *
         * @jsidplay2.systemProperty jsidplay2.hls.not_yet_played.timeout
         */
        int HLS_NOT_YET_PLAYED_TIMEOUT = parseInt(getProperty("jsidplay2.hls.not_yet_played.timeout", "15"));

        /**
         * Video streaming: Live stream played and exceeds maximum duration will be quit after timeout in s (default:
         * 60min). This is to prevent endless video generation.
         *
         * @jsidplay2.systemProperty jsidplay2.rtmp.exceeds_maximum.duration
         */
        int RTMP_EXCEEDS_MAXIMUM_DURATION = parseInt(getProperty("jsidplay2.rtmp.exceeds_maximum.duration", "3600"));

        /**
         * Time in s to check for obsolete directories to delete (default: 300s)
         *
         * @jsidplay2.systemProperty jsidplay2.cleanup.directory.period
         */
        int CLEANUP_DIRECTORY_PERIOD = parseInt(getProperty("jsidplay2.cleanup.directory.period", "300"));

        /**
         * Time in s after obsolete temporary directories to delete (default: 2hrs)
         *
         * @jsidplay2.systemProperty jsidplay2.cleanup.directory.maximum.duration
         */
        int MAXIMUM_DURATION_TEMP_DIRECTORIES = parseInt(
                getProperty("jsidplay2.cleanup.directory.maximum.duration", valueOf(2 * 60 * 60)));

        /**
         * Video streaming: Time in s to print out currently generated RTMP video streams (default: 30s)
         *
         * @jsidplay2.systemProperty jsidplay2.rtmp.print.player.period
         */
        int RTMP_PRINT_PLAYER_PERIOD = parseInt(getProperty("jsidplay2.rtmp.print.player.period", "30"));

    }

    interface DirectoryServlet {
        /**
         * Directory: maximum number of requests in parallel (default: 16)
         *
         * @jsidplay2.systemProperty jsidplay2.directory.max.parallel
         */
        int MAX_DIRECTORY_IN_PARALLEL = parseInt(getProperty("jsidplay2.directory.max.parallel", "16"));

        /**
         * Directory: Asynchronous servlets default timeout in ms (0 means disable, default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.directory.async.timeout
         */
        int DIRECTORY_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.directory.async.timeout", "60000"));

    }

    interface DiskDirectoryServlet {

        /**
         * DiskDirectory: maximum number of requests in parallel (default: 16)
         *
         * @jsidplay2.systemProperty jsidplay2.diskdirectory.max.parallel
         */
        int MAX_DISK_DIRECTORY_IN_PARALLEL = parseInt(getProperty("jsidplay2.diskdirectory.max.parallel", "16"));

        /**
         * DiskDirectory: Asynchronous servlets default timeout in ms (0 means disable, default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.diskdirectory.async.timeout
         */
        int DISK_DIRECTORY_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.diskdirectory.async.timeout", "60000"));

    }

    interface DownloadServlet {

        /**
         * Download: maximum number of requests in parallel (default: 16)
         *
         * @jsidplay2.systemProperty jsidplay2.download.max.parallel
         */
        int MAX_DOWNLOAD_IN_PARALLEL = parseInt(getProperty("jsidplay2.download.max.parallel", "16"));

        /**
         * Download: Asynchronous servlets default timeout in ms (0 means disable, default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.download.async.timeout
         */
        int DOWNLOAD_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.download.async.timeout", "60000"));

    }

    interface RandomCSDBServlet {

        /**
         * Download: maximum number of requests in parallel (default: 16)
         *
         * @jsidplay2.systemProperty jsidplay2.random-csdb.max.parallel
         */
        int MAX_RANDOM_CSDB_IN_PARALLEL = parseInt(getProperty("jsidplay2.random-csdb.max.parallel", "16"));

        /**
         * Download: Asynchronous servlets default timeout in ms (0 means disable, default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.random-csdb.async.timeout
         */
        int RANDOM_CSDB_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.random-csdb-csdb.async.timeout", "60000"));

    }

    interface PhotoServlet {

        /**
         * Photo: maximum number of requests in parallel (default: 16)
         *
         * @jsidplay2.systemProperty jsidplay2.photo.max.parallel
         */
        int MAX_PHOTO_IN_PARALLEL = parseInt(getProperty("jsidplay2.photo.max.parallel", "16"));

        /**
         * Photo: Asynchronous servlets default timeout in ms (0 means disable, default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.photo.async.timeout
         */
        int PHOTO_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.photo.async.timeout", "60000"));

    }

    interface SongLength {

        /**
         * SongLength: maximum number of requests in parallel (default: 16)
         *
         * @jsidplay2.systemProperty jsidplay2.songlength.max.parallel
         */
        int MAX_SONG_LENGTH_IN_PARALLEL = parseInt(getProperty("jsidplay2.songlength.max.parallel", "16"));

        /**
         * SongLength: Asynchronous servlets default timeout in ms (0 means disable, default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.songlength.async.timeout
         */
        int SONG_LENGTH_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.songlength.async.timeout", "60000"));

    }

    interface DiskChangeServlet {

        /**
         * DiskChange Maximum number of requests in parallel (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.diskchange.max.parallel
         */
        int MAX_DISK_CHANGE = parseInt(getProperty("jsidplay2.diskchange.max.parallel", "50"));

        /**
         * DiskChange: Asynchronous servlets default timeout in ms (0 means disable, default: 6s)
         *
         * @jsidplay2.systemProperty jsidplay2.diskchange.async.timeout
         */
        int DISK_CHANGE_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.diskchange.async.timeout", "6000"));

        /**
         * DiskChange: maximum number of idle requests waiting to come alive (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.diskchange.max.parallel.core
         */
        int MAX_DISK_CHANGE_IN_PARALLEL_CORE = parseInt(getProperty("jsidplay2.diskchange.max.parallel.core", "7"));

        /**
         * DiskChange: maximum number of requests in parallel (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.diskchange.max.parallel
         */
        int MAX_DISK_CHANGE_IN_PARALLEL = parseInt(getProperty("jsidplay2.diskchange.max.parallel", "7"));

        /**
         * DiskChange: Maximum time for idle threads to wait to start recognition until they get alive (default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.diskchange.time
         */
        int DISK_CHANGE_KEEPALIVE_TIME = parseInt(getProperty("jsidplay2.diskchange.time", "60"));

        /**
         * DiskChange Maximum number of requests waiting for recognition until they get rejected (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.diskchange.queue.size
         */
        int DISK_CHANGE_QUEUE_SIZE = parseInt(getProperty("jsidplay2.diskchange.queue.size", "50"));
    }

    interface DiskChangeSuggestServlet {

        /**
         * DiskChangeSuggest Maximum number of requests in parallel (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.diskchangesuggest.max.parallel
         */
        int MAX_DISK_CHANGE_SUGGEST = parseInt(getProperty("jsidplay2.diskchangesuggest.max.parallel", "50"));

        /**
         * DiskChangeSuggest: Asynchronous servlets default timeout in ms (0 means disable, default: 6s)
         *
         * @jsidplay2.systemProperty jsidplay2.diskchangesuggest.async.timeout
         */
        int DISK_CHANGE_SUGGEST_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.diskchangesuggest.async.timeout", "6000"));

        /**
         * DiskChangeSuggest: maximum number of idle requests waiting to come alive (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.diskchangesuggest.max.parallel.core
         */
        int MAX_DISK_CHANGE_SUGGEST_IN_PARALLEL_CORE = parseInt(getProperty("jsidplay2.diskchangesuggest.max.parallel.core", "7"));

        /**
         * DiskChangeSuggest: maximum number of requests in parallel (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.diskchangesuggest.max.parallel
         */
        int MAX_DISK_CHANGE_SUGGEST_IN_PARALLEL = parseInt(getProperty("jsidplay2.diskchangesuggest.max.parallel", "7"));

        /**
         * DiskChangeSuggest: Maximum time for idle threads to wait to start recognition until they get alive (default:
         * 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.diskchangesuggest.time
         */
        int DISK_CHANGE_SUGGEST_KEEPALIVE_TIME = parseInt(getProperty("jsidplay2.diskchangesuggest.time", "60"));

        /**
         * DiskChangeSuggest Maximum number of requests waiting for recognition until they get rejected (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.diskchangesuggest.queue.size
         */
        int DISK_CHANGE_SUGGEST_QUEUE_SIZE = parseInt(getProperty("jsidplay2.diskchangesuggest.queue.size", "50"));
    }

    interface KeyEventServlet {

        /**
         * KeyEvent Maximum number of requests in parallel (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.keyevent.max.parallel
         */
        int MAX_KEY_EVENT = parseInt(getProperty("jsidplay2.keyevent.max.parallel", "50"));

        /**
         * KeyEvent: Asynchronous servlets default timeout in ms (0 means disable, default: 6s)
         *
         * @jsidplay2.systemProperty jsidplay2.keyevent.async.timeout
         */
        int KEY_EVENT_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.keyevent.async.timeout", "6000"));

        /**
         * KeyEvent: maximum number of idle requests waiting to come alive (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.keyevent.max.parallel.core
         */
        int MAX_KEY_EVENT_IN_PARALLEL_CORE = parseInt(getProperty("jsidplay2.keyevent.max.parallel.core", "7"));

        /**
         * KeyEvent: maximum number of requests in parallel (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.keyevent.max.parallel
         */
        int MAX_KEY_EVENT_IN_PARALLEL = parseInt(getProperty("jsidplay2.keyevent.max.parallel", "7"));

        /**
         * KeyEvent: Maximum time for idle threads to wait to start recognition until they get alive (default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.keyevent.time
         */
        int KEY_EVENT_KEEPALIVE_TIME = parseInt(getProperty("jsidplay2.keyevent.time", "60"));

        /**
         * KeyEvent Maximum number of requests waiting for recognition until they get rejected (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.keyevent.queue.size
         */
        int KEY_EVENT_QUEUE_SIZE = parseInt(getProperty("jsidplay2.keyevent.queue.size", "50"));
    }

    interface KeyEventSuggestServlet {

        /**
         * KeyEventSuggest Maximum number of requests in parallel (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.keyeventsuggest.max.parallel
         */
        int MAX_KEY_EVENT_SUGGEST = parseInt(getProperty("jsidplay2.keyeventsuggest.max.parallel", "50"));

        /**
         * KeyEventSuggest: Asynchronous servlets default timeout in ms (0 means disable, default: 6s)
         *
         * @jsidplay2.systemProperty jsidplay2.keyeventsuggest.async.timeout
         */
        int KEY_EVENT_SUGGEST_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.keyeventsuggest.async.timeout", "6000"));

        /**
         * KeyEventSuggest: maximum number of idle requests waiting to come alive (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.keyeventsuggest.max.parallel.core
         */
        int MAX_KEY_EVENT_SUGGEST_IN_PARALLEL_CORE = parseInt(getProperty("jsidplay2.keyeventsuggest.max.parallel.core", "7"));

        /**
         * KeyEventSuggest: maximum number of requests in parallel (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.keyeventsuggest.max.parallel
         */
        int MAX_KEY_EVENT_SUGGEST_IN_PARALLEL = parseInt(getProperty("jsidplay2.keyeventsuggest.max.parallel", "7"));

        /**
         * KeyEventSuggest: Maximum time for idle threads to wait to start recognition until they get alive (default:
         * 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.keyeventsuggest.time
         */
        int KEY_EVENT_SUGGEST_KEEPALIVE_TIME = parseInt(getProperty("jsidplay2.keyeventsuggest.time", "60"));

        /**
         * KeyEventSuggest Maximum number of requests waiting for recognition until they get rejected (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.keyeventsuggest.queue.size
         */
        int KEY_EVENT_SUGGEST_QUEUE_SIZE = parseInt(getProperty("jsidplay2.keyeventsuggest.queue.size", "50"));
    }

    interface EndEventSuggestServlet {

        /**
         * EndEventSuggest Maximum number of requests in parallel (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.endeventsuggest.max.parallel
         */
        int MAX_END_EVENT_SUGGEST = parseInt(getProperty("jsidplay2.endeventsuggest.max.parallel", "50"));

        /**
         * EndEventSuggest: Asynchronous servlets default timeout in ms (0 means disable, default: 6s)
         *
         * @jsidplay2.systemProperty jsidplay2.endeventsuggest.async.timeout
         */
        int END_EVENT_SUGGEST_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.endeventsuggest.async.timeout", "6000"));

        /**
         * EndEventSuggest: maximum number of idle requests waiting to come alive (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.endeventsuggest.max.parallel.core
         */
        int MAX_END_EVENT_SUGGEST_IN_PARALLEL_CORE = parseInt(getProperty("jsidplay2.endeventsuggest.max.parallel.core", "7"));

        /**
         * EndEventSuggest: maximum number of requests in parallel (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.endeventsuggest.max.parallel
         */
        int MAX_END_EVENT_SUGGEST_IN_PARALLEL = parseInt(getProperty("jsidplay2.endeventsuggest.max.parallel", "7"));

        /**
         * EndEventSuggest: Maximum time for idle threads to wait to start recognition until they get alive (default:
         * 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.endeventsuggest.time
         */
        int END_EVENT_SUGGEST_KEEPALIVE_TIME = parseInt(getProperty("jsidplay2.endeventsuggest.time", "60"));

        /**
         * EndEventSuggest Maximum number of requests waiting for recognition until they get rejected (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.endeventsuggest.queue.size
         */
        int END_EVENT_SUGGEST_QUEUE_SIZE = parseInt(getProperty("jsidplay2.endeventsuggest.queue.size", "50"));
    }

    interface RemoveSessionServlet {

        /**
         * RemoveSession Maximum number of requests in parallel (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.removesession.max.parallel
         */
        int MAX_REMOVE_SESSION = parseInt(getProperty("jsidplay2.removesession.max.parallel", "50"));

        /**
         * RemoveSession: Asynchronous servlets default timeout in ms (0 means disable, default: 6s)
         *
         * @jsidplay2.systemProperty jsidplay2.removesession.async.timeout
         */
        int REMOVE_SESSION_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.removesession.async.timeout", "6000"));

        /**
         * RemoveSession: maximum number of idle requests waiting to come alive (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.removesession.max.parallel.core
         */
        int MAX_REMOVE_SESSION_IN_PARALLEL_CORE = parseInt(getProperty("jsidplay2.removesession.max.parallel.core", "7"));

        /**
         * RemoveSession: maximum number of requests in parallel (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.removesession.max.parallel
         */
        int MAX_REMOVE_SESSION_IN_PARALLEL = parseInt(getProperty("jsidplay2.removesession.max.parallel", "7"));

        /**
         * RemoveSession: Maximum time for idle threads to wait to start recognition until they get alive (default:
         * 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.removesession.time
         */
        int REMOVE_SESSION_KEEPALIVE_TIME = parseInt(getProperty("jsidplay2.removesession.time", "60"));

        /**
         * RemoveSession Maximum number of requests waiting for recognition until they get rejected (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.removesession.queue.size
         */
        int REMOVE_SESSION_QUEUE_SIZE = parseInt(getProperty("jsidplay2.removesession.queue.size", "50"));
    }

    interface EndEventServlet {

        /**
         * EndEvent Maximum number of requests in parallel (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.endevent.max.parallel
         */
        int MAX_END_EVENT = parseInt(getProperty("jsidplay2.endevent.max.parallel", "50"));

        /**
         * EndEvent: Asynchronous servlets default timeout in ms (0 means disable, default: 6s)
         *
         * @jsidplay2.systemProperty jsidplay2.endevent.async.timeout
         */
        int END_EVENT_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.endevent.async.timeout", "6000"));

        /**
         * EndEvent: maximum number of idle requests waiting to come alive (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.endevent.max.parallel.core
         */
        int MAX_END_EVENT_IN_PARALLEL_CORE = parseInt(getProperty("jsidplay2.endevent.max.parallel.core", "7"));

        /**
         * EndEvent: maximum number of requests in parallel (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.endevent.max.parallel
         */
        int MAX_END_EVENT_IN_PARALLEL = parseInt(getProperty("jsidplay2.endevent.max.parallel", "7"));

        /**
         * EndEvent: Maximum time for idle threads to wait to start recognition until they get alive (default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.endevent.time
         */
        int END_EVENT_KEEPALIVE_TIME = parseInt(getProperty("jsidplay2.endevent.time", "60"));

        /**
         * EndEvent Maximum number of requests waiting for recognition until they get rejected (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.endevent.queue.size
         */
        int END_EVENT_QUEUE_SIZE = parseInt(getProperty("jsidplay2.endevent.queue.size", "50"));
    }

    interface RandomAutoPlayServlet {

        /**
         * RandomAutoPlay Maximum number of requests in parallel (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.randomautoplay.max.parallel
         */
        int MAX_RANDOM_AUTOPLAY = parseInt(getProperty("jsidplay2.randomautoplay.max.parallel", "50"));

        /**
         * RandomAutoPlay: Asynchronous servlets default timeout in ms (0 means disable, default: 6s)
         *
         * @jsidplay2.systemProperty jsidplay2.randomautoplay.async.timeout
         */
        int RANDOM_AUTOPLAY_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.randomautoplay.async.timeout", "6000"));

        /**
         * RandomAutoPlay: maximum number of idle requests waiting to come alive (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.randomautoplay.max.parallel.core
         */
        int MAX_RANDOM_AUTOPLAY_IN_PARALLEL_CORE = parseInt(getProperty("jsidplay2.randomautoplay.max.parallel.core", "7"));

        /**
         * RandomAutoPlay: maximum number of requests in parallel (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.randomautoplay.max.parallel
         */
        int MAX_RANDOM_AUTOPLAY_IN_PARALLEL = parseInt(getProperty("jsidplay2.randomautoplay.max.parallel", "7"));

        /**
         * RandomAutoPlay: Maximum time for idle threads to wait to start recognition until they get alive (default:
         * 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.randomautoplay.time
         */
        int RANDOM_AUTOPLAY_KEEPALIVE_TIME = parseInt(getProperty("jsidplay2.randomautoplay.time", "60"));

        /**
         * RandomAutoPlay Maximum number of requests waiting for recognition until they get rejected (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.randomautoplay.queue.size
         */
        int RANDOM_AUTOPLAY_QUEUE_SIZE = parseInt(getProperty("jsidplay2.randomautoplay.queue.size", "50"));
    }

    interface SpeechToTextServlet {

        /**
         * SpeechToText Maximum number of requests in parallel (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.speech2text.max.parallel
         */
        int MAX_SPEECH_TO_TEXT = parseInt(getProperty("jsidplay2.speech2text.max.parallel", "50"));

        /**
         * SpeechToText: Asynchronous servlets default timeout in ms (0 means disable, default: 6s)
         *
         * @jsidplay2.systemProperty jsidplay2.speechtotext.async.timeout
         */
        int SPEECHTOTEXT_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.speechtotext.async.timeout", "6000"));

        /**
         * SpeechToText: maximum number of idle requests waiting to come alive (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.speechtotext.max.parallel.core
         */
        int MAX_SPEECHTOTEXT_IN_PARALLEL_CORE = parseInt(getProperty("jsidplay2.speechtotext.max.parallel.core", "7"));

        /**
         * SpeechToText: maximum number of requests in parallel (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.speechtotext.max.parallel
         */
        int MAX_SPEECHTOTEXT_IN_PARALLEL = parseInt(getProperty("jsidplay2.speechtotext.max.parallel", "7"));

        /**
         * SpeechToText Maximum inactive interval in s per session until the session gets cleared (default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.speech2text.max.inactive.interval
         */
        int SPEECHTOTEXT_SESSION_MAX_INACTIVE_INTERVAL = parseInt(
                getProperty("jsidplay2.speech2text.max.inactive.interval", "60"));

        /**
         * SpeechToText Maximum number of requests waiting for recognition until they get rejected (default: 50)
         *
         * @jsidplay2.systemProperty jsidplay2.speech2text.queue.size
         */
        int SPEECHTOTEXT_QUEUE_SIZE = parseInt(getProperty("jsidplay2.speech2text.queue.size", "50"));

        /**
         * SpeechToText: Maximum time for idle threads to wait to start recognition until they get alive (default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.speech2text.keepalive.time
         */
        int SPEECHTOTEXT_KEEPALIVE_TIME = parseInt(getProperty("jsidplay2.speech2text.keepalive.time", "60"));

        /**
         * SpeechToText Maximum recording time per session (default: 6s)
         *
         * @jsidplay2.systemProperty jsidplay2.speech2text.max.recording.time
         */
        int SPEECHTOTEXT_MAX_RECORDING_TIME = parseInt(getProperty("jsidplay2.speech2text.max.recording.time", "6"));

        /**
         * SpeechToText Model for locale de (default: ~/.cache/vosk/vosk-model-small-de-0.15)
         *
         * @jsidplay2.systemProperty jsidplay2.speech2text.model.de
         */
        String SPEECHTOTEXT_MODEL_DE = getProperty("jsidplay2.speech2text.model.de",
                System.getProperty("user.home") + "/.cache/vosk/vosk-model-small-de-0.15");

        /**
         * SpeechToText Model for locale en (default: ~/.cache/vosk/vosk-model-small-en-us-0.15)
         *
         * @jsidplay2.systemProperty jsidplay2.speech2text.model.en
         */
        String SPEECHTOTEXT_MODEL_EN = getProperty("jsidplay2.speech2text.model.en",
                System.getProperty("user.home") + "/.cache/vosk/vosk-model-small-en-us-0.15");

        /**
         * SpeechToText activate noise reduction (default: false)
         *
         * @jsidplay2.systemProperty jsidplay2.speech2text.deepfilter
         */
        boolean SPEECHTOTEXT_DEEPFILTER = parseBoolean(getProperty("jsidplay2.speech2text.deepfilter", "false"));
    }

    interface StaticServlet {

        int SLEEP_TIME = parseInt(getProperty("jsidplay2.sleep_time", "3"));

    }

    interface StartPageServlet {

        /**
         * Minimum time in ms between requests of StartPageServlet (default: 500ms)
         *
         * @jsidplay2.systemProperty jsidplay2.start_page.min.time.between.requests
         */
        int MIN_TIME_BETWEEN_REQUESTS = parseInt(getProperty("jsidplay2.start_page.min.time.between.requests", "500"));

        /**
         * Maximum requests per minute of StartPageServlet (default: 30)
         *
         * @jsidplay2.systemProperty jsidplay2.start_page.max.requests.per.minute
         */
        int MAX_REQUESTS_PER_MINUTE = parseInt(getProperty("jsidplay2.start_page.max.requests.per.minute", "30"));

    }

    interface StilServlet {

        /**
         * Stil: maximum number of requests in parallel (default: 16)
         *
         * @jsidplay2.systemProperty jsidplay2.stil.max.parallel
         */
        int MAX_STIL_IN_PARALLEL = parseInt(getProperty("jsidplay2.stil.max.parallel", "16"));

        /**
         * Stil: Asynchronous servlets default timeout in ms (0 means disable, default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.stil.async.timeout
         */
        int STIL_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.stil.async.timeout", "60000"));

    }

    interface TuneInfoServlet {

        /**
         * TuneInfo: maximum number of requests in parallel (default: 16)
         *
         * @jsidplay2.systemProperty jsidplay2.tuneinfo.max.parallel
         */
        int MAX_TUNE_INFO_IN_PARALLEL = parseInt(getProperty("jsidplay2.tuneinfo.max.parallel", "16"));

        /**
         * TuneInfo: Asynchronous servlets default timeout in ms (0 means disable, default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.tuneinfo.async.timeout
         */
        int TUNE_INFO_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.tuneinfo.async.timeout", "60000"));

    }

    interface PlaybackServlet {

        /**
         * Playback: maximum number of requests in parallel (default: 7).
         *
         * @jsidplay2.systemProperty jsidplay2.playback.max.parallel
         */
        int MAX_PLAYBACKS_IN_PARALLEL = parseInt(getProperty("jsidplay2.playback.max.parallel", "7"));

        /**
         * Playback: asynchronous servlet timeout in ms (0 disables the timeout, default: 60s).
         *
         * @jsidplay2.systemProperty jsidplay2.playback.async.timeout
         */
        int PLAYBACK_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.playback.async.timeout", "60000"));

    }

    interface UploadServlet {

        /**
         * Uploads maximum number of requests in parallel (default: 7)
         *
         * @jsidplay2.systemProperty jsidplay2.upload.max.parallel
         */
        int MAX_UPLOADS_IN_PARALLEL = parseInt(getProperty("jsidplay2.upload.max.parallel", "7"));

        /**
         * Upload: Asynchronous servlets default timeout in ms (0 means disable, default: 0s)
         *
         * @jsidplay2.systemProperty jsidplay2.upload.async.timeout
         */
        int UPLOAD_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.upload.async.timeout", "0"));

        /**
         * Upload servlet: Maximum request size in bytes (default: 17mb)
         *
         * @jsidplay2.systemProperty jsidplay2.uploadservlet.max.request.size
         */
        long UPLOADSERVLET_MAX_REQUEST_SIZE = 17 << 10 << 10;

        /**
         * Upload servlet: Maximum file size in bytes (default: 17mb)
         *
         * @jsidplay2.systemProperty jsidplay2.uploadservlet.max.file.size
         */
        long UPLOADSERVLET_MAX_FILE_SIZE = 17 << 10 << 10;

        /**
         * Upload servlet: File size threshold at which the file will be written to the disk (default: 0)
         *
         * @jsidplay2.systemProperty jsidplay2.uploadservlet.file.size.threshold
         */
        int UPLOADSERVLET_FILE_SIZE_THRESHOLD = 0;

    }

    interface WhatsSIDServlet {

        /**
         * WhatsSID: maximum number of requests in parallel (default: 3)
         *
         * @jsidplay2.systemProperty jsidplay2.whatssid.max.parallel
         */
        int MAX_WHATSIDS_IN_PARALLEL = parseInt(getProperty("jsidplay2.whatssid.max.parallel", "3"));

        /**
         * WhatsSidServlet: Asynchronous servlets default timeout in ms (0 means disable, default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.whatssid.async.timeout
         */
        int WHATSSID_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.whatssid.async.timeout", "60000"));

        /**
         * WhatsSID servlet: Maximum request size in bytes (default: unlimited)
         *
         * @jsidplay2.systemProperty jsidplay2.whatssidservlet.max.request.size
         */
        long WHATSSIDSERVLET_MAX_REQUEST_SIZE = -1L;

        /**
         * WhatsSID servlet: Maximum file size in bytes (default: unlimited)
         *
         * @jsidplay2.systemProperty jsidplay2.whatssidservlet.max.file.size
         */
        long WHATSSIDSERVLET_MAX_FILE_SIZE = -1L;

        /**
         * WhatsSID servlet: File size threshold at which the file will be written to the disk (default: 0)
         *
         * @jsidplay2.systemProperty jsidplay2.whatssidservlet.file.size.threshold
         */
        int WHATSSIDSERVLET_FILE_SIZE_THRESHOLD = 0;

        /**
         * Put WhatsSID in maintenance mode (default: false)
         *
         * @jsidplay2.systemProperty jsidplay2.whatssid.maintenance
         */
        boolean WHATSID_MAINTENANCE = parseBoolean(getProperty("jsidplay2.whatssid.maintenance", "false"));

        /**
         * WhatsSID: first serve RTMP requests, disable WhatsSID requests meanwhile (default: true)
         *
         * @jsidplay2.systemProperty jsidplay2.whatssid.low_prio
         */
        boolean WHATSID_LOW_PRIO = parseBoolean(getProperty("jsidplay2.whatssid.low_prio", "true"));

        /**
         * WhatsSID cache size (default: 60000). Recognized audio is cached for repeated requests for performance
         * reasons
         *
         * @jsidplay2.systemProperty jsidplay2.whatssid.cache.size
         */
        int CACHE_SIZE = parseInt(getProperty("jsidplay2.whatssid.cache.size", "60000"));

        /**
         * WhatsSID maximum number of seconds used to recognize a tune (default: 15s)
         *
         * @jsidplay2.systemProperty jsidplay2.whatssid.max.seconds
         */
        long MAX_SECONDS = parseLong(System.getProperty("jsidplay2.whatssid.max.seconds", "15"));

        /**
         * WhatsSID maximum number of seconds used to recognize an uploaded tune (default: 45s)
         *
         * @jsidplay2.systemProperty jsidplay2.whatssid.upload.max.seconds
         */
        long UPLOAD_MAX_SECONDS = parseLong(getProperty("jsidplay2.whatssid.upload.max.seconds", "45"));

        /**
         * WhatsSID query timeout in ms of tune recognition's findHashes query to prevent blocking database connections
         * during database startup (default: 120s).
         *
         * @jsidplay2.systemProperty jsidplay2.whatssid.query.timeout
         */
        int QUERY_TIMEOUT = Integer
                .parseInt(System.getProperty("jsidplay2.whatssid.query.timeout", valueOf(120/* s */ * 1000)));

    }

    interface ExSIDMappingServlet {

        /**
         * ExSIDMapping: maximum number of requests in parallel (default: 16)
         *
         * @jsidplay2.systemProperty jsidplay2.exsidmapping.max.parallel
         */
        int MAX_EXSIDMAPPING_IN_PARALLEL = parseInt(getProperty("jsidplay2.exsidmapping.max.parallel", "16"));

        /**
         * ExSIDMapping: Asynchronous servlets default timeout in ms (0 means disable, default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.exsidmapping.async.timeout
         */
        int EXSIDMAPPING_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.exsidmapping.async.timeout", "60000"));

    }

    interface HardSIDMappingServlet {

        /**
         * HardSIDMapping: maximum number of requests in parallel (default: 16)
         *
         * @jsidplay2.systemProperty jsidplay2.hardsidmapping.max.parallel
         */
        int MAX_HARDSIDMAPPING_IN_PARALLEL = parseInt(getProperty("jsidplay2.hardsidmapping.max.parallel", "16"));

        /**
         * HardSIDMapping: Asynchronous servlets default timeout in ms (0 means disable, default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.hardsidmapping.async.timeout
         */
        int HARDSIDMAPPING_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.hardsidmapping.async.timeout", "60000"));

    }

    interface USBSIDMappingServlet {

        /**
         * USBSIDMapping: maximum number of requests in parallel (default: 16)
         *
         * @jsidplay2.systemProperty jsidplay2.usbsidmapping.max.parallel
         */
        int MAX_USBSIDMAPPING_IN_PARALLEL = parseInt(getProperty("jsidplay2.usbsidmapping.max.parallel", "16"));

        /**
         * USBSIDMapping: Asynchronous servlets default timeout in ms (0 means disable, default: 60s)
         *
         * @jsidplay2.systemProperty jsidplay2.usbsidmapping.async.timeout
         */
        int USBSIDMAPPING_ASYNC_TIMEOUT = parseInt(getProperty("jsidplay2.usbsidmapping.async.timeout", "60000"));

    }

}