public AgentProperties findParametersFromUrl ( String url , Logger logger ) { logger . info ( "User data are being retrieved from URL: " + url ) ; AgentProperties result = null ; try { URI uri = UriUtils . urlToUri ( url ) ; Properties props = new Properties ( ) ; InputStream in = null ; try { in = uri . toURL ( ) . openStream ( ) ; props . load ( in ) ; } finally { Utils . closeQuietly ( in ) ; } result = AgentProperties . readIaasProperties ( props ) ; } catch ( Exception e ) { logger . fine ( "Agent parameters could not be read from " + url ) ; result = null ; } return result ; }
Retrieve the agent s configuration from an URL .