@ Override public PollResult poll ( boolean initial , Object checkPoint ) throws IOException { if ( configUrls == null || configUrls . length == 0 ) { return PollResult . createFull ( null ) ; } Map < String , Object > map = new HashMap < String , Object > ( ) ; for ( URL url : configUrls ) { InputStream fin = url . openStream ( ) ; Properties props = ConfigurationUtils . loadPropertiesFromInputStream ( fin ) ; for ( Entry < Object , Object > entry : props . entrySet ( ) ) { map . put ( ( String ) entry . getKey ( ) , entry . getValue ( ) ) ; } } return PollResult . createFull ( map ) ; }
Retrieve the content of the property files . For each poll it always returns the complete union of properties defined in all URLs . If one property is defined in content of more than one URL the value in file later on the list will override the value in the previous one .