* requested by passing in "infinity" for the maximum
* number of matches (Integer.MAX_VALUE).
*/
if(filter != null) max = Integer.MAX_VALUE;
/* Query the current lookup for matching service(s). */
ServiceMatches sm = proxy.lookup(tmpl, max);
int nItems = sm.items.length;
if(nItems == 0) continue;//no matches, query next lookup
/* Loop thru the matching services, randomly selecting
* each service, applying the filter if appropriate,
* and making sure the service has not already been