* registrar's service ID in its list of known registrars. This method
* assumes that the protocol version of the request has already been
* checked.
*/
public void run() {
MulticastRequest req;
try {
req = decoder.decodeMulticastRequest(
datagram,
multicastRequestConstraints.getUnfulfilledConstraints(),
multicastRequestSubjectChecker, true);
} catch (Exception e) {
if (!(e instanceof InterruptedIOException) &&
logger.isLoggable(Levels.HANDLED))
{
logThrow(
Levels.HANDLED,
getClass().getName(),
"run",
"exception decoding multicast request from {0}:{1}",
new Object[]{
datagram.getAddress(),
new Integer(datagram.getPort()) },
e);
}
return;
}
String[] groups = req.getGroups();
if ((groups.length == 0 || overlap(memberGroups, groups)) &&
indexOf(req.getServiceIDs(), myServiceID) < 0)
{
try {
req.checkConstraints();
} catch (Exception e) {
if (!(e instanceof InterruptedIOException) &&
logger.isLoggable(Levels.HANDLED))
{
logThrow(
Levels.HANDLED,
getClass().getName(),
"run",
"exception decoding multicast request from {0}:{1}",
new Object[]{
datagram.getAddress(),
new Integer(datagram.getPort()) },
e);
}
return;
}
tasker.addIfNew(new AddressTask(req.getHost(), req.getPort()));
}
}