Package org.osgi.framework

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


            {
                public void run()
                {
                    try
                    {
                        bundle.start();
                    }
                    catch (BundleException e)
                    {
                        e.printStackTrace();
                    }
View Full Code Here


            long t1 = System.currentTimeMillis();

            assertEquals(Bundle.RESOLVED, bundle.getState());
            assertTrue((t1 - t0) > DELAY / 2);

            bundle.start();

            new Thread()
            {
                public void run()
                {
View Full Code Here

                    }
                }
            }.start();
            Thread.sleep(DELAY / 4);
            t0 = System.currentTimeMillis();
            bundle.start();
            t1 = System.currentTimeMillis();

            assertEquals(Bundle.ACTIVE, bundle.getState());
            assertTrue((t1 - t0) > DELAY / 2);
        } finally {
View Full Code Here

        f.start();

        try
        {
            final Bundle bundle = f.getBundleContext().installBundle(bundleFile.toURI().toString());
            bundle.start();
        }
        finally
        {
            try
            {
View Full Code Here

            + Constants.BUNDLE_ACTIVATOR + ": " + TestURLHandlersActivator.class.getName();

        File bundleFile = createBundle(mf, TestURLHandlersActivator.class);

        final Bundle bundle = f.getBundleContext().installBundle(bundleFile.toURI().toString());
        bundle.start();

        Class clazz1 = cl1.loadClass(URLHandlersTest.class.getName());

        clazz1.getMethod("testURLHandlers").invoke(clazz1.newInstance());
View Full Code Here

        // uninstall bundle while configuration admin is stopped
        bundle.uninstall();
        bundle = null;

        // start cm bundle again after uninstallation
        cmBundle.start();
        delay();

        // ensure a freshly retrieved object also does not have the location
        // FELIX-1484: this test fails due to bundle location not verified
        // at first configuration access
View Full Code Here

        // restart CM bundle
        final Bundle cmBundle = getCmBundle();
        cmBundle.stop();
        delay();
        cmBundle.start();

        // assert configuration still bound
        final Configuration configAfterRestart = getConfiguration( pid );
        TestCase.assertEquals( pid, configAfterRestart.getPid() );
        TestCase.assertEquals( location, configAfterRestart.getBundleLocation() );
View Full Code Here

        configListener.assertEvents( ConfigurationEvent.CM_LOCATION_CHANGED, 1 );

        // restart CM bundle
        cmBundle.stop();
        delay();
        cmBundle.start();

        // assert configuration unbound
        final Configuration configUnboundAfterRestart = getConfiguration( pid );
        TestCase.assertEquals( pid, configUnboundAfterRestart.getPid() );
        TestCase.assertNull( configUnboundAfterRestart.getBundleLocation() );
View Full Code Here

        // restart CM bundle
        final Bundle cmBundle = getCmBundle();
        cmBundle.stop();
        delay();
        cmBundle.start();

        // assert configuration still bound
        final Configuration configAfterRestart = getConfiguration( pid );
        TestCase.assertEquals( pid, configAfterRestart.getPid() );
        TestCase.assertEquals( location, configAfterRestart.getBundleLocation() );
View Full Code Here

        TestCase.assertEquals( location, configAfterRestart.getBundleLocation() );

        // restart CM bundle
        cmBundle.stop();
        delay();
        cmBundle.start();

        // assert configuration still bound
        final Configuration configBoundAfterRestart = getConfiguration( pid );
        TestCase.assertEquals( pid, configBoundAfterRestart.getPid() );
        TestCase.assertEquals( location, configBoundAfterRestart.getBundleLocation() );
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.