Package org.apache.karaf.util.tracker

Examples of org.apache.karaf.util.tracker.Services


                URL classUrl = clazz.getClassLoader().getResource(clazz.getName().replace('.', '/') + ".class");
                if (classUrl == null || !classUrl.getPath().startsWith(project.getBuild().getOutputDirectory())) {
                    System.out.println("Ignoring " + classUrl);
                    continue;
                }
                Services services = clazz.getAnnotation(Services.class);
                if (services != null) {
                    for (RequireService req : services.requires()) {
                        String flt = req.filter();
                        if (flt != null && !flt.isEmpty()) {
                            flt = "(&(objectClass=" + req.value().getName() + ")" + flt + ")";
                        } else {
                            flt = "(objectClass=" + req.value().getName() + ")";
                        }
                        if (requirements.length() > 0) {
                            requirements.append(",");
                        }
                        requirements.append("osgi.service;effective:=active;filter:=\"")
                                    .append(flt)
                                    .append("\"");
                    }
                    for (ProvideService cap : services.provides()) {
                        if (capabilities.length() > 0) {
                            capabilities.append(",");
                        }
                        capabilities.append("osgi.service;effective:=active;objectClass=")
                                    .append(cap.value().getName());
View Full Code Here

TOP

Related Classes of org.apache.karaf.util.tracker.Services

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.