Package org.apache.felix.ipojo.dependency.impl

Examples of org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager


        if (context != null) {
            m_context = context;
            // If the context is null, it gonna be set later using the setBundleContext method.
        }

        m_serviceReferenceManager = new ServiceReferenceManager(this, filter, comparator);

        if (filter != null) {
            try {
                m_contextSourceManager = new ContextSourceManager(this);
            } catch (InvalidSyntaxException e) {
View Full Code Here


                    computeServiceReferenceDescription(ref, use);
                    dep.addElement(use);
                }
            }

            final ServiceReferenceManager serviceReferenceManager = dependency.getDependency()
                    .getServiceReferenceManager();
            if (serviceReferenceManager == null) {
                // Exit here, cannot compute anything else.
                deps.addElement(dep);
                continue;
            }

            set = serviceReferenceManager.getMatchingServices();
            if (set != null) {
                for (ServiceReference ref : set) {
                    Element use = new Element("Matches", "");
                    computeServiceReferenceDescription(ref, use);
                    dep.addElement(use);
                }
            }

            // Add interceptors to the description
            List<ServiceReference> interceptors = serviceReferenceManager.getTrackingInterceptorReferences();
            for (ServiceReference ref : interceptors) {
                Element itcp = new Element("ServiceTrackingInterceptor", "");
                computeInterceptorDescription(ref, itcp);
                dep.addElement(itcp);
            }

            ServiceReference ref = serviceReferenceManager.getRankingInterceptorReference();
            if (ref != null) {
                Element itcp = new Element("ServiceRankingInterceptor", "");
                computeInterceptorDescription(ref, itcp);
                dep.addElement(itcp);
            }

            interceptors = serviceReferenceManager.getBindingInterceptorReferences();
            for (ServiceReference rf : interceptors) {
                Element itcp = new Element("ServiceBindingInterceptor", "");
                computeInterceptorDescription(rf, itcp);
                dep.addElement(itcp);
            }
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.dependency.impl.ServiceReferenceManager

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.