public static void init ( Properties configuration ) { for ( Object prop : configuration . keySet ( ) ) { String serverPropertyName = ( String ) prop ; System . setProperty ( PROPERTY_PREFIX + serverPropertyName , configuration . getProperty ( serverPropertyName ) ) ; } // Read system properties LOG . info ( "Using configuration provided using '-D' parameter and/or default values" ) ; EsigateServer . port = getProperty ( PROPERTY_PREFIX , "port" , PROPERTY_DEFAULT_HTTP_PORT ) ; EsigateServer . controlPort = getProperty ( PROPERTY_PREFIX , "controlPort" , PROPERTY_DEFAULT_CONTROL_PORT ) ; EsigateServer . contextPath = getProperty ( PROPERTY_PREFIX , "contextPath" , "/" ) ; EsigateServer . extraClasspath = getProperty ( PROPERTY_PREFIX , "extraClasspath" , null ) ; EsigateServer . maxThreads = getProperty ( PROPERTY_PREFIX , "maxThreads" , 500 ) ; EsigateServer . minThreads = getProperty ( PROPERTY_PREFIX , "minThreads" , 40 ) ; EsigateServer . outputBufferSize = getProperty ( PROPERTY_PREFIX , "outputBufferSize" , 8 * 1024 ) ; EsigateServer . idleTimeout = getProperty ( PROPERTY_PREFIX , "idleTimeout" , 30 * 1000 ) ; EsigateServer . sessionCookieName = getProperty ( PROPERTY_PREFIX , "sessionCookieName" , null ) ; }
Set the provided server configuration then read configuration from System properties or load defaults .