public static Collection < ServiceResolver > discover ( InetAddress start , int count , int msTimeout ) { Collection < ServiceResolver > result = new ArrayList < ServiceResolver > ( ) ; Collection < InetAddress > hosts = IPv4Scanner . scanRange ( start , count , msTimeout ) ; for ( InetAddress host : hosts ) { ServiceResolver resolver = new ServiceResolver ( host ) ; logger . info ( "resolving {} {}" , host . getHostAddress ( ) , host . getCanonicalHostName ( ) ) ; JSONResult config = resolver . getConfig ( ) ; if ( config != null ) { result . add ( resolver ) ; } } return result ; }
Discover FireREST services located in a range of IPv4 InetAddresses . E . g . The range of 256 addresses that starts with 10 . 0 . 1 . 128 ends with 10 . 0 . 2 . 127 .