Examples of serviceChanged()


Examples of com.hellblazer.slp.ServiceListener.serviceChanged()

                        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,
View Full Code Here

Examples of io.fabric8.dosgi.impl.Manager.serviceChanged()

            expect(expBundle.getBundleContext()).andReturn(expBundleContext).anyTimes();
            expect(expBundle.getState()).andReturn(Bundle.ACTIVE).anyTimes();

            replay(bundleContext, registration, reference, expBundleContext, expBundle);

            manager.serviceChanged(new ServiceEvent(ServiceEvent.REGISTERED, reference));
            Thread.sleep(1000);

            verify(bundleContext, registration, reference, expBundleContext, expBundle);

        }
View Full Code Here

Examples of org.apache.felix.dm.FilterIndex.serviceChanged()

    public void serviceChangedForFilterIndices(ServiceEvent event) {
        Iterator iterator = m_filterIndexList.iterator();
        while (iterator.hasNext()) {
            FilterIndex filterIndex = (FilterIndex) iterator.next();
            filterIndex.serviceChanged(event);
        }
    }

//    public void _sc(CommandInterpreter ci) {
//        ci.println(toString());
View Full Code Here

Examples of org.jboss.gravia.runtime.ServiceListener.serviceChanged()

                try {
                    String filterstr = info.getFilter();
                    ServiceListener listener = listenerReg.getListener();
                    if (listenerReg.isAllServiceListener() || listenerReg.filter.match(reference)) {
                        listener.serviceChanged(event);
                    }

                    // The MODIFIED_ENDMATCH event is synchronously delivered after the service properties have been modified.
                    // This event is only delivered to listeners which were added with a non-null filter where
                    // the filter matched the service properties prior to the modification but the filter does
View Full Code Here

Examples of org.jboss.gravia.runtime.ServiceListener.serviceChanged()

                    // not match the modified service properties.
                    else if (filterstr != null && ServiceEvent.MODIFIED == event.getType()) {
                        Filter filter = listenerReg.filter;
                        if (/* filter.match(reference.getPreviousProperties()) && */ !filter.match(reference)) {
                            ServiceEvent endmatch = new ServiceEventImpl(ServiceEvent.MODIFIED_ENDMATCH, reference);
                            listener.serviceChanged(endmatch);
                        }
                    }
                } catch (Throwable th) {
                    LOGGER.warn("Error while firing service event " + typeName + " for: " + reference, th);
                }
View Full Code Here

Examples of org.jboss.gravia.runtime.ServiceListener.serviceChanged()

                try {
                    String filterstr = info.getFilter();
                    ServiceListener listener = listenerReg.getListener();
                    if (listenerReg.isAllServiceListener() || listenerReg.filter.match(reference)) {
                        listener.serviceChanged(event);
                    }

                    // The MODIFIED_ENDMATCH event is synchronously delivered after the service properties have been modified.
                    // This event is only delivered to listeners which were added with a non-null filter where
                    // the filter matched the service properties prior to the modification but the filter does
View Full Code Here

Examples of org.jboss.gravia.runtime.ServiceListener.serviceChanged()

                    // not match the modified service properties.
                    else if (filterstr != null && ServiceEvent.MODIFIED == event.getType()) {
                        Filter filter = listenerReg.filter;
                        if (/* filter.match(reference.getPreviousProperties()) && */ !filter.match(reference)) {
                            ServiceEvent endmatch = new ServiceEventImpl(ServiceEvent.MODIFIED_ENDMATCH, reference);
                            listener.serviceChanged(endmatch);
                        }
                    }
                } catch (Throwable th) {
                    LOGGER.warn("Error while firing service event " + typeName + " for: " + reference, th);
                }
View Full Code Here

Examples of org.jboss.gravia.runtime.ServiceListener.serviceChanged()

                try {
                    String filterstr = info.getFilter();
                    ServiceListener listener = listenerReg.getListener();
                    if (listenerReg.isAllServiceListener() || listenerReg.filter.match(reference)) {
                        listener.serviceChanged(event);
                    }

                    // The MODIFIED_ENDMATCH event is synchronously delivered after the service properties have been modified.
                    // This event is only delivered to listeners which were added with a non-null filter where
                    // the filter matched the service properties prior to the modification but the filter does
View Full Code Here

Examples of org.jboss.gravia.runtime.ServiceListener.serviceChanged()

                    // not match the modified service properties.
                    else if (filterstr != null && ServiceEvent.MODIFIED == event.getType()) {
                        Filter filter = listenerReg.filter;
                        if (/* filter.match(reference.getPreviousProperties()) && */ !filter.match(reference)) {
                            ServiceEvent endmatch = new ServiceEventImpl(ServiceEvent.MODIFIED_ENDMATCH, reference);
                            listener.serviceChanged(endmatch);
                        }
                    }
                } catch (Throwable th) {
                    LOGGER.warn("Error while firing service event " + typeName + " for: " + reference, th);
                }
View Full Code Here

Examples of org.osgi.framework.AllServiceListener.serviceChanged()

        ArgumentCaptor<AllServiceListener> argument = ArgumentCaptor.forClass(AllServiceListener.class);
        verify(context).addServiceListener(argument.capture());

        //send events
        AllServiceListener serviceListener = argument.getValue();
        serviceListener.serviceChanged(registeredEvent);
        serviceListener.serviceChanged(modifiedEvent);

        //shutdown dispatcher via unregister callback
        serviceState.postDeregister();
        //check the ServiceListener is cleaned up
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.