Package org.osgi.framework

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


            myElementaryRefacs.add(new UserRefactoringInfo(next.substring(
                    next.lastIndexOf('/') + 1, next.lastIndexOf('.'))));

        }
        // user's own composite refactorings
        final Enumeration userCompositeModules = coreBundle.findEntries(
                "wrangler/ebin/my_gen_composite_refac", "*.beam", false);
        while (userCompositeModules != null && userCompositeModules.hasMoreElements()) {
            final String next = userCompositeModules.nextElement().toString();
            myCompositeRefacs.add(new UserRefactoringInfo(next.substring(
                    next.lastIndexOf('/') + 1, next.lastIndexOf('.'))));
View Full Code Here


       
        // Set up some mock objects
        IMocksControl control = EasyMock.createNiceControl();
        Bundle b0 = control.createMock(Bundle.class);
        EasyMock.expect(b0.getState()).andReturn(Bundle.ACTIVE).anyTimes();
        EasyMock.expect(b0.findEntries("OSGI-INF/remote-service", "*.xml", false)).
                andReturn(rsAEnum).anyTimes();
       
        BundleContext bc = control.createMock(BundleContext.class);
        ServiceReference sr = control.createMock(ServiceReference.class);
        TestDiscoveredServiceTracker dst = new TestDiscoveredServiceTracker();
View Full Code Here

       
        // add a new bundle that also contains a someservice
        // we should get notified again...
        Bundle b1 = EasyMock.createNiceMock(Bundle.class);
        EasyMock.expect(b1.getState()).andReturn(Bundle.ACTIVE).anyTimes();
        EasyMock.expect(b1.findEntries("OSGI-INF/remote-service", "*.xml", false)).
                andReturn(rsBEnum).anyTimes();
        EasyMock.replay(b1);

        // Call back on the LDS just like what would have happened with the BundleListener
        BundleEvent be = new BundleEvent(BundleEvent.STARTED, b1);
View Full Code Here

                new ArrayList<DiscoveredServiceNotification>(dst.notifications);
       
        // add an unrelated bundle - no notification...
        Bundle b2 = EasyMock.createNiceMock(Bundle.class);
        EasyMock.expect(b2.getState()).andReturn(Bundle.ACTIVE).anyTimes();
        EasyMock.expect(b2.findEntries("OSGI-INF/remote-service", "*.xml", false)).
                andReturn(rsCEnum).anyTimes();
        EasyMock.replay(b2);
       
        BundleEvent be2 = new BundleEvent(BundleEvent.STARTED, b1);
        lds.bundleChanged(be2);
View Full Code Here

           
            // Set up some mock objects
            IMocksControl control = EasyMock.createNiceControl();
            Bundle b0 = control.createMock(Bundle.class);
            EasyMock.expect(b0.getState()).andReturn(Bundle.ACTIVE).anyTimes();
            EasyMock.expect(b0.findEntries("OSGI-INF/remote-service", "*.xml", false)).
                    andReturn(rsAEnum).anyTimes();
           
            BundleContext bc = control.createMock(BundleContext.class);
            Filter mockFilter = control.createMock(Filter.class);
            ServiceReference sr = control.createMock(ServiceReference.class);
View Full Code Here

           
            // add a new bundle that also contains a someservice
            // we should get notified again...
            Bundle b1 = EasyMock.createNiceMock(Bundle.class);
            EasyMock.expect(b1.getState()).andReturn(Bundle.ACTIVE).anyTimes();
            EasyMock.expect(b1.findEntries("OSGI-INF/remote-service", "*.xml", false)).
                    andReturn(rsBEnum).anyTimes();
            EasyMock.replay(b1);
   
            // Call back on the LDS just like what would have happened with the BundleListener
            BundleEvent be = new BundleEvent(BundleEvent.STARTED, b1);
View Full Code Here

                    new ArrayList<DiscoveredServiceNotification>(dst.notifications);
           
            // add an unrelated bundle - no notification...
            Bundle b2 = EasyMock.createNiceMock(Bundle.class);
            EasyMock.expect(b2.getState()).andReturn(Bundle.ACTIVE).anyTimes();
            EasyMock.expect(b2.findEntries("OSGI-INF/remote-service", "*.xml", false)).
                    andReturn(rsCEnum).anyTimes();
            EasyMock.replay(b2);
           
            BundleEvent be2 = new BundleEvent(BundleEvent.STARTED, b1);
            lds.bundleChanged(be2);
View Full Code Here

           
            // Set up some mock objects
            IMocksControl control = EasyMock.createNiceControl();
            Bundle b0 = control.createMock(Bundle.class);
            EasyMock.expect(b0.getState()).andReturn(Bundle.ACTIVE).anyTimes();
            EasyMock.expect(b0.findEntries("OSGI-INF/remote-service", "*.xml", false)).
                    andReturn(rsAEnum).anyTimes();
           
            BundleContext bc = control.createMock(BundleContext.class);
            EasyMock.expect(bc.getBundles()).andReturn(new Bundle[] {b0}).anyTimes();
   
View Full Code Here

           
            // Set up some mock objects
            IMocksControl control = EasyMock.createNiceControl();
            Bundle b0 = control.createMock(Bundle.class);
            EasyMock.expect(b0.getState()).andReturn(Bundle.INSTALLED).anyTimes();
            EasyMock.expect(b0.findEntries("OSGI-INF/remote-service", "*.xml", false)).
                    andReturn(rsAEnum).anyTimes();
   
            Bundle b1 = control.createMock(Bundle.class);
            EasyMock.expect(b1.getState()).andReturn(Bundle.ACTIVE).anyTimes();
            EasyMock.expect(b1.findEntries("OSGI-INF/remote-service", "*.xml", false)).
View Full Code Here

            EasyMock.expect(b0.findEntries("OSGI-INF/remote-service", "*.xml", false)).
                    andReturn(rsAEnum).anyTimes();
   
            Bundle b1 = control.createMock(Bundle.class);
            EasyMock.expect(b1.getState()).andReturn(Bundle.ACTIVE).anyTimes();
            EasyMock.expect(b1.findEntries("OSGI-INF/remote-service", "*.xml", false)).
                    andReturn(rsBEnum).anyTimes();
           
            BundleContext bc = control.createMock(BundleContext.class);
            ServiceReference sr = control.createMock(ServiceReference.class);
            TestDiscoveredServiceTracker dst = new TestDiscoveredServiceTracker();
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.