Package org.apache.felix.framework.util

Examples of org.apache.felix.framework.util.ListenerInfo


        Set<ServiceReference<org.osgi.framework.hooks.service.ListenerHook>> listenerHooks =
            m_registry.getHooks(org.osgi.framework.hooks.service.ListenerHook.class);
        if (oldFilter != null)
        {
            final Collection removed = Collections.singleton(
                new ListenerInfo(bundle, bundle._getBundleContext(),
                    ServiceListener.class, l, oldFilter, null, true));
            for (ServiceReference<org.osgi.framework.hooks.service.ListenerHook> sr : listenerHooks)
            {
                org.osgi.framework.hooks.service.ListenerHook lh = getService(this, sr, false);
                if (lh != null)
                {
                    try
                    {
                        m_secureAction.invokeServiceListenerHookRemoved(lh, removed);
                    }
                    catch (Throwable th)
                    {
                        m_logger.log(sr, Logger.LOG_WARNING,
                            "Problem invoking service registry hook", th);
                    }
                    finally
                    {
                        m_registry.ungetService(this, sr, null);
                    }
                }
            }
        }

        // Invoke the ListenerHook.added() on all hooks.
        final Collection added = Collections.singleton(
            new ListenerInfo(bundle, bundle._getBundleContext(),
                ServiceListener.class, l, newFilter, null, false));
        for (ServiceReference<org.osgi.framework.hooks.service.ListenerHook> sr : listenerHooks)
        {
            org.osgi.framework.hooks.service.ListenerHook lh = getService(this, sr, false);
            if (lh != null)
View Full Code Here


        Set<ServiceReference<org.osgi.framework.hooks.service.ListenerHook>> listenerHooks =
            m_registry.getHooks(org.osgi.framework.hooks.service.ListenerHook.class);
        if (oldFilter != null)
        {
            final Collection removed = Collections.singleton(
                new ListenerInfo(bundle, bundle._getBundleContext(),
                    ServiceListener.class, l, oldFilter, null, true));
            for (ServiceReference<org.osgi.framework.hooks.service.ListenerHook> sr : listenerHooks)
            {
                org.osgi.framework.hooks.service.ListenerHook lh = getService(this, sr);
                if (lh != null)
                {
                    try
                    {
                        m_secureAction.invokeServiceListenerHookRemoved(lh, removed);
                    }
                    catch (Throwable th)
                    {
                        m_logger.log(sr, Logger.LOG_WARNING,
                            "Problem invoking service registry hook", th);
                    }
                    finally
                    {
                        m_registry.ungetService(this, sr);
                    }
                }
            }
        }

        // Invoke the ListenerHook.added() on all hooks.
        final Collection added = Collections.singleton(
            new ListenerInfo(bundle, bundle._getBundleContext(),
                ServiceListener.class, l, newFilter, null, false));
        for (ServiceReference<org.osgi.framework.hooks.service.ListenerHook> sr : listenerHooks)
        {
            org.osgi.framework.hooks.service.ListenerHook lh = getService(this, sr);
            if (lh != null)
View Full Code Here

        Set<ServiceReference<org.osgi.framework.hooks.service.ListenerHook>> listenerHooks =
            m_registry.getHooks(org.osgi.framework.hooks.service.ListenerHook.class);
        if (oldFilter != null)
        {
            final Collection removed = Collections.singleton(
                new ListenerInfo(bundle, bundle._getBundleContext(),
                    ServiceListener.class, l, oldFilter, null, true));
            for (ServiceReference<org.osgi.framework.hooks.service.ListenerHook> sr : listenerHooks)
            {
                org.osgi.framework.hooks.service.ListenerHook lh = getService(this, sr);
                if (lh != null)
                {
                    try
                    {
                        m_secureAction.invokeServiceListenerHookRemoved(lh, removed);
                    }
                    catch (Throwable th)
                    {
                        m_logger.log(sr, Logger.LOG_WARNING,
                            "Problem invoking service registry hook", th);
                    }
                    finally
                    {
                        m_registry.ungetService(this, sr);
                    }
                }
            }
        }

        // Invoke the ListenerHook.added() on all hooks.
        final Collection added = Collections.singleton(
            new ListenerInfo(bundle, bundle._getBundleContext(),
                ServiceListener.class, l, newFilter, null, false));
        for (ServiceReference<org.osgi.framework.hooks.service.ListenerHook> sr : listenerHooks)
        {
            org.osgi.framework.hooks.service.ListenerHook lh = getService(this, sr);
            if (lh != null)
View Full Code Here

TOP

Related Classes of org.apache.felix.framework.util.ListenerInfo

Copyright © 2018 www.massapicom. 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.