executor.execute(new Runnable() {
@Override
public void run() {
for (ListenerRegistration reg : listeners) {
if (reg.query.match(reference)) {
final ServiceListener listener = reg.listener;
executor.execute(new Runnable() {
@Override
public void run() {
try {
listener.serviceChanged(new ServiceEvent(
type,
reference));
} catch (Throwable e) {
log.error(String.format("Error when notifying listener %s on reference %s type %s",
listener,