Examples of findEntries()


Examples of org.osgi.framework.Bundle.findEntries()

        EasyMock.verify(bc);
    }
   
    public void testGetDecoratorElements() {
        Bundle b = EasyMock.createMock(Bundle.class);
        EasyMock.expect(b.findEntries("OSGI-INF/remote-service", "*.xml", false)).andReturn(
            Collections.enumeration(Arrays.asList(getClass().getResource("/test-resources/sd.xml")))).anyTimes();
        EasyMock.replay(b);

        List<Element> elements = ServiceDecoratorImpl.getDecorationElements(b);
        assertEquals(1, elements.size());
View Full Code Here

Examples of org.osgi.framework.wiring.BundleWiring.findEntries()

        String filename = path.substring(path.lastIndexOf('/') + 1);

        for (Bundle bundle : bundleContext.getBundles()) {

            BundleWiring wiring = bundle.adapt(BundleWiring.class);
            List<URL> entries = wiring.findEntries(directory, filename, 0);
            for (URL url : entries) {
                try {
                    return Streams.readBytes(url.openStream());
                } catch (IOException e) {
                    // Ignore and move to the next source
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.