verifyNotification(startNotificationMap, address, 0);
updateMap(startNotificationMap, address);
if (recursiveCount < RECURSIVE_LIMIT) {
recursiveEndpoints[recursiveCount++] =
Endpoint.publish(ADDRESSES[recursiveCount],
new GreeterImpl());
}
}
public void stopServer(Server server) {
String address =
server.getEndpoint().getEndpointInfo().getAddress();
verifyNotification(stopNotificationMap, address, 0);
updateMap(stopNotificationMap, address);
if (recursiveCount > 0) {
recursiveEndpoints[--recursiveCount].stop();
}
}
});
Endpoint.publish(ADDRESSES[0], new GreeterImpl()).stop();
for (int i = 0; i < ADDRESSES.length; i++) {
verifyNotification(startNotificationMap, ADDRESSES[i], 1);
verifyNotification(stopNotificationMap, ADDRESSES[i], 1);
}
}