public void applyProperties ( Swarm swarm ) throws IOException { URL propsUrl = get ( PROPERTIES_URL ) ; if ( propsUrl != null ) { Properties urlProps = new Properties ( ) ; urlProps . load ( propsUrl . openStream ( ) ) ; for ( String name : urlProps . stringPropertyNames ( ) ) { swarm . withProperty ( name , urlProps . getProperty ( name ) ) ; } } Properties props = get ( PROPERTY ) ; for ( String name : props . stringPropertyNames ( ) ) { swarm . withProperty ( name , props . getProperty ( name ) ) ; } if ( get ( BIND ) != null ) { swarm . withProperty ( SwarmProperties . BIND_ADDRESS , get ( BIND ) ) ; } }
Apply properties to the system properties .