@ Override public synchronized void start ( ) { Preconditions . checkNotNull ( getServer ( ) ) ; String osName = System . getProperty ( "os.name" ) ; String osVersion = System . getProperty ( "os.version" ) ; log . info ( "Bootstrapping {} ({})" , settings . getApplicationName ( ) , settings . getApplicationVersion ( ) ) ; Util . logSetting ( log , "Fathom" , Constants . getVersion ( ) ) ; Util . logSetting ( log , "Mode" , settings . getMode ( ) . toString ( ) ) ; Util . logSetting ( log , "Operating System" , String . format ( "%s (%s)" , osName , osVersion ) ) ; Util . logSetting ( log , "Available processors" , Runtime . getRuntime ( ) . availableProcessors ( ) ) ; Util . logSetting ( log , "Available heap" , ( Runtime . getRuntime ( ) . maxMemory ( ) / ( 1024 * 1024 ) ) + " MB" ) ; SimpleDateFormat df = new SimpleDateFormat ( "z Z" ) ; df . setTimeZone ( TimeZone . getDefault ( ) ) ; String offset = df . format ( new Date ( ) ) ; Util . logSetting ( log , "JVM timezone" , String . format ( "%s (%s)" , TimeZone . getDefault ( ) . getID ( ) , offset ) ) ; Util . logSetting ( log , "JVM locale" , Locale . getDefault ( ) ) ; long startTime = System . nanoTime ( ) ; getServer ( ) . start ( ) ; String contextPath = settings . getContextPath ( ) ; if ( settings . getHttpsPort ( ) > 0 ) { log . info ( "https://{}:{}{}" , settings . getHttpsListenAddress ( ) , settings . getHttpsPort ( ) , contextPath ) ; } if ( settings . getHttpPort ( ) > 0 ) { log . info ( "http://{}:{}{}" , settings . getHttpListenAddress ( ) , settings . getHttpPort ( ) , contextPath ) ; } if ( settings . getAjpPort ( ) > 0 ) { log . info ( "ajp://{}:{}{}" , settings . getAjpListenAddress ( ) , settings . getAjpPort ( ) , contextPath ) ; } long delta = TimeUnit . NANOSECONDS . toMillis ( System . nanoTime ( ) - startTime ) ; String duration ; if ( delta < 1000L ) { duration = String . format ( "%s ms" , delta ) ; } else { duration = String . format ( "%.1f seconds" , ( delta / 1000f ) ) ; } log . info ( "Fathom bootstrapped {} mode in {}" , settings . getMode ( ) . toString ( ) , duration ) ; log . info ( "READY." ) ; }
Starts Fathom synchronously .