}
}
private class DiscoveryCallback implements DiscoveredServiceTracker {
public void serviceChanged(DiscoveredServiceNotification notification) {
ServiceEndpointDescription notified =
notification.getServiceEndpointDescription();
switch (notification.getType()) {
case AVAILABLE:
LOG.info("Notified - AVAILABLE: "
+ notified.getProvidedInterfaces()
+ " endpoint id: "
+ notification.getServiceEndpointDescription().getProperty(ENDPOINT_ID));
processNotification(notification, getContext());
break;
case UNAVAILABLE:
LOG.info("Notified - UNAVAILABLE: " + notified.getProvidedInterfaces()
+ notified.getProvidedInterfaces()
+ " endpoint id: "
+ notification.getServiceEndpointDescription().getProperty(ENDPOINT_ID));
unCacheEndpointId(notified);
break;
case MODIFIED:
LOG.info("Notified - MODIFIED: " + notified.getProvidedInterfaces());
// we don't currently use this notification, but we could do
// so to allow to support transparent service re-location
break;
}
}