120121122123124125126127128129130
ServiceListener listener = new ServiceListener() { public void serviceChanged(ServiceEvent event) { if (event.getType() == ServiceEvent.REGISTERED) counter.decrement(); } }; OsgiListenerUtils.addServiceListener(context, listener, filter);