@Override
public void serviceLost(final DNSSDService browser, final int flags, final int ifIndex, final String serviceName,
final String regType, final String domain) {
if(log.isDebugEnabled()) {
log.debug(String.format("Service lost for %s", serviceName));
}
final ActionOperationBatcher autorelease = ActionOperationBatcherFactory.get();
try {
final String identifier = DNSSD.constructFullName(serviceName, regType, domain);
this.remove(identifier);
}
catch(DNSSDException e) {
log.error(String.format("Failure removing service %s: %s", serviceName, e.getMessage()), e);
}
finally {
autorelease.operate();
}
}