question: protected void initLoadBalancer ( boolean isHttps ) { String baseServiceURLTemplate = new String ( ) ; if ( isHttps ) { baseServiceURLTemplate = "https://%1$s:4443" ; } else { baseServiceURLTemplate = "http://%1$s:8080" ; } String hostName = System . getenv ( "APP_HOST_NAMES" ) ; String hostNames [ ] = hostName . split ( "," ) ; baseUrls = new LinkedList < String > ( ) ; for ( String h : hostNames ) { String disp = String . format ( baseServiceURLTemplate , h ) ; baseUrls . add ( disp ) ; } }
target:  initialize the list of hosts based on the APP_HOST_NAMES env. variable