logger.log(Level.FINE, "run()");
/* Callback join manager */
logger.log(Level.FINE,
"retrieving the discovery manager from the "
+"callback join manager ...");
DiscoveryManagement dmCallback = joinMgrCallback.getDiscoveryManager();
if(dmCallback == null) {
throw new TestException("could not successfully retrieve "
+"the discovery manager");
} else {
logger.log(Level.FINE,
"discovery manager successfully retrieved");
}//endif
if( !(dmCallback instanceof LookupDiscoveryManager) ) {
throw new TestException(
"callback join manager -- "
+"discovery manager is NOT an "
+"instance of LookupDiscoveryManager");
}//endif
LookupLocator[] locsCallback =
((LookupDiscoveryManager)dmCallback).getLocators();
if( (locsCallback != null) && (locsCallback.length > 0) ) {
throw new TestException(
"callback join manager -- "
+"discovery manager has a NON-empty "
+"managed set of locators");
}//endif
logger.log(Level.FINE, "retrieving the managed set of groups ...");
String[] groupsCallback =
((LookupDiscoveryManager)dmCallback).getGroups();
if(groupsCallback == DiscoveryGroupManagement.ALL_GROUPS) {
throw new TestException(
"callback join manager -- discovery "
+"manager configured for ALL_GROUPS");
} else {//(groupsCallback != DiscoveryGroupManagement.ALL_GROUPS)
logger.log(Level.FINE,
" discovery manager configured to discover "
+groupsCallback.length+" group(s)");
for(int i=0;i<groupsCallback.length;i++){
if( (new String("")).equals(groupsCallback[0]) ) {
logger.log(Level.FINE,
" groups["+i+"] = the public group");
} else {
logger.log(Level.FINE,
" groups["+i+"] = "+groupsCallback[i]);
}
}//end loop
if( (groupsCallback != null) && (groupsCallback.length == 0) ) {
throw new TestException(
"callback join manager -- discovery "
+"manager configured for NO_GROUPS");
}
if( (groupsCallback != null) && (groupsCallback.length > 1) ) {
throw new TestException(
"callback join manager -- discovery "
+"manager configured for more than one group");
}
if( !( (new String("")).equals(groupsCallback[0]) ) ) {
throw new TestException(
"callback join manager -- discovery "
+"manager configured for one NON-public group "
+"("+groupsCallback[0]+")");
}
}//endif(groupsCallback == DiscoveryGroupManagement.ALL_GROUPS)
/* Service ID join manager */
logger.log(Level.FINE,
"retrieving the discovery manager from the "
+"service ID join manager ...");
DiscoveryManagement dmSrvcID = joinMgrSrvcID.getDiscoveryManager();
if(dmSrvcID == null) {
throw new TestException("could not successfully retrieve "
+"the discovery manager");
} else {
logger.log(Level.FINE,