* (NO_GROUPS) as the input to the constructor.
*/
logger.log(Level.FINE,
"creating a new LookupDiscovery with input = "
+constStr);
LookupDiscovery ld = new LookupDiscovery
(DiscoveryGroupManagement.NO_GROUPS,
getConfig().getConfiguration());
lookupDiscoveryList.add(ld);
/* Add a listener to the lookup discovery utility created above,
* and verify the listener receives no events.
*/
mainListener.clearAllEventInfo();//listener expects no events
ld.addDiscoveryListener(mainListener);
waitForDiscovery(mainListener);
/* Re-configure the listener to expect events for the lookups
* started during setup.
*/
logger.log(Level.FINE, "calling "+methodStr
+" to change the groups to discover to -- ");
if(groupsToDiscover == DiscoveryGroupManagement.ALL_GROUPS) {
logger.log(Level.FINE, " ALL_GROUPS");
} else {
if(groupsToDiscover.length == 0) {
logger.log(Level.FINE, " NO_GROUPS");
} else {
for(int i=0;i<groupsToDiscover.length;i++) {
logger.log(Level.FINE, " "
+groupsToDiscover[i]);
}//end loop
}//endif
}//endif
mainListener.setLookupsToDiscover(initLookupsToStart);
/* Using either addGroups ore setGroups, re-configure the lookup
* discovery utility to discover the lookup services started in
* setup
*/
if(addGroups) {
ld.addGroups(groupsToDiscover);
} else {
ld.setGroups(groupsToDiscover);
}//endif
/* Verify that the listener receives the expected events */
waitForDiscovery(mainListener);
}//end run