}
private void fireServiceAddEvent(final URI uri) {
System.out.println("discoveryAgent.fireServiceAddEvent");
if (discoveryListener != null) {
final DiscoveryListener discoveryListener = this.discoveryListener;
// Have the listener process the event async so that
// he does not block this thread since we are doing time sensitive
// processing of events.
executor.execute(new Runnable() {
public void run() {
if (discoveryListener != null) {
discoveryListener.serviceAdded(uri);
}
}
});
}
}