@Override public void serviceChanged(ServiceEvent event) { int type = event.getType(); ServiceReference<?> sref = event.getServiceReference(); List<String> clazzes = Arrays.asList(((String[]) sref.getProperty(Constants.OBJECTCLASS))); if (type == ServiceEvent.UNREGISTERING && clazzes.contains(ServiceA1.class.getName())) { ctxA.removeServiceListener(this); latch.countDown(); } } };
/** * Returns a reference to the service that had a change occur in its * lifecycle. * <p> * This reference is the source of the event. * * @return Reference to the service that had a lifecycle change. */ public ServiceReference<?> getServiceReference() { return (ServiceReference<?>) getSource(); }
String typeName = ConstantsHelper.serviceEvent(event.getType()); LOGGER.trace("Service {}: {}", typeName, reference); else if (filterstr != null && ServiceEvent.MODIFIED == event.getType()) { Filter filter = listenerReg.filter; if (/* filter.match(reference.getPreviousProperties()) && */ !filter.match(reference)) {
@Override @SuppressWarnings({ "unchecked", "rawtypes" }) public void serviceChanged(org.jboss.gravia.runtime.ServiceEvent event) { ServiceReference<?> sref = new ServiceReferenceAdaptor(event.getServiceReference()); delegate.serviceChanged(new ServiceEvent(event.getType(), sref)); }