/* Creating a LookupLocatorDiscovery instance using null as the
* input to the constructor.
*/
logger.log(Level.FINE, "creating a LookupLocatorDiscovery with input = "
+constStr);
LookupLocatorDiscovery lld
= new LookupLocatorDiscovery(locsToDiscover,
getConfig().getConfiguration());
locatorDiscoveryList.add(lld);
/* Add a listener to the lookup locator discovery utility created
* above, and verify the listener receives no events.
*/
mainListener.clearAllEventInfo();//listener expects no events
lld.addDiscoveryListener(mainListener);
waitForDiscovery(mainListener);
/* Re-configure the listener to expect events for the lookups
* started during setup.
*/
locsToDiscover = toLocatorArray(initLookupsToStart);
logger.log(Level.FINE, "calling "+methodStr
+" to change the locators to discover to -- ");
for(int i=0;i<locsToDiscover.length;i++) {
logger.log(Level.FINE, " "+locsToDiscover[i]);
}//end loop
mainListener.setLookupsToDiscover(initLookupsToStart);
/* Using either addLocators ore setLocators, re-configure the
* lookup locator discovery utility to discover the lookup
* services started in setup
*/
if(addLocs) {
lld.addLocators(locsToDiscover);
} else {
lld.setLocators(locsToDiscover);
}//endif
/* Verify that the listener receives the expected events */
waitForDiscovery(mainListener);
}//end run