disco = getDiscovery(multicastAnnouncementConstraints
.chooseProtocolVersion());
} catch (DiscoveryProtocolException e) {
throw new AssertionError(e);
}
EncodeIterator ei = disco.encodeMulticastAnnouncement(
new MulticastAnnouncement(announcementSeqNo++,
myLocator.getHost(),
myLocator.getPort(),
groups,
myServiceID),
multicastAnnouncementConstraints
.getMulticastMaxPacketSize(DEFAULT_MAX_PACKET_SIZE),
multicastAnnouncementConstraints
.getUnfulfilledConstraints());
while (ei.hasNext()) {
try {
packets.addAll(Arrays.asList(ei.next()));
} catch (Exception e) {
logger.log( (e instanceof
UnsupportedConstraintException)
? Levels.HANDLED : Level.INFO,
"exception encoding multicast"