public static String resolveUriPrefix ( Config config , SharedRestClientKey key ) throws URISyntaxException , NotConfiguredException { List < String > connectionPrefixes = parseConnectionPrefixes ( config , key ) ; Preconditions . checkArgument ( connectionPrefixes . size ( ) > 0 , "No uris found for service " + key . serviceName ) ; return connectionPrefixes . get ( new Random ( ) . nextInt ( connectionPrefixes . size ( ) ) ) ; }
Get a uri prefix from the input configuration .