Examples of waitForStop()


Examples of org.osgi.framework.launch.Framework.waitForStop()

                System.exit(1);
            }

            if (m_verbose)
                System.out.println("Startup complete..");
            framework.waitForStop(0);
        }
        catch (Exception e) {
            System.err.println(e.getMessage());
            e.printStackTrace();
            System.exit(1);
View Full Code Here

Examples of org.osgi.framework.launch.Framework.waitForStop()

        Framework framework = factory.newFramework(frameworkProperties);

        framework.start();

        try {
            framework.waitForStop(0);
        }
        finally {
            System.exit(0);
        }
    }
View Full Code Here

Examples of org.osgi.framework.launch.Framework.waitForStop()

        boot.bootstrap();

        framework.stop();
        getLog().debug("Waiting for shutdown (up to 5 minutes)...");
        framework.waitForStop(60 * 5 * 1000);
    }

    //
    // Deployment
    //
View Full Code Here

Examples of org.osgi.framework.launch.Framework.waitForStop()

        kernel.shutdown();
        kernel = null;
        Framework framework = (Framework) bundleContext.getBundle();
        framework.stop();
        getLog().debug("Waiting for shutdown (up to 5 minutes)...");
        framework.waitForStop(60 * 5 * 1000);
        bundleContext = null;
    }

    /**
     * Create a Geronimo Kernel to contain the deployment configurations.
View Full Code Here

Examples of org.osgi.framework.launch.Framework.waitForStop()

        configuration.put(Constants.FRAMEWORK_STORAGE, "target/papoose");

        FrameworkFactory factory = new PapooseFrameworkFactory();
        final Framework framework = factory.newFramework(configuration);

        FrameworkEvent frameworkEvent = framework.waitForStop(0);

        assertNotNull(frameworkEvent);
        assertEquals(FrameworkEvent.STOPPED, frameworkEvent.getType());
        assertSame(framework, frameworkEvent.getBundle());
View Full Code Here

Examples of org.osgi.framework.launch.Framework.waitForStop()

        {
            Future<FrameworkEvent> result = pool.submit(new Callable<FrameworkEvent>()
            {
                public FrameworkEvent call() throws Exception
                {
                    return framework.waitForStop(0);
                }
            });

            framework.stop();
View Full Code Here

Examples of org.osgi.framework.launch.Framework.waitForStop()

            assertNotNull(frameworkEvent);
            assertEquals(FrameworkEvent.STOPPED, frameworkEvent.getType());
            assertSame(systemBundle, frameworkEvent.getBundle());

            framework.waitForStop(0);
        }
        finally
        {
            pool.shutdown();
        }
View Full Code Here

Examples of org.osgi.framework.launch.Framework.waitForStop()

            pool.shutdown();
        }

        try
        {
            framework.waitForStop(-1);
            Assert.fail("Should never accept negative wait timeouts");
        }
        catch (IllegalArgumentException iae)
        {
        }
View Full Code Here

Examples of org.osgi.framework.launch.Framework.waitForStop()

        }
        catch (IllegalArgumentException iae)
        {
        }

        frameworkEvent = framework.waitForStop(Long.MAX_VALUE);

        assertNotNull(frameworkEvent);
        assertEquals(FrameworkEvent.STOPPED, frameworkEvent.getType());
        assertSame(systemBundle, frameworkEvent.getBundle());
View Full Code Here

Examples of org.osgi.framework.launch.Framework.waitForStop()

        framework.stop();

        Thread.sleep(1);

        frameworkEvent = framework.waitForStop(0);

        assertNotNull(frameworkEvent);
        assertEquals(FrameworkEvent.STOPPED, frameworkEvent.getType());
        assertSame(systemBundle, frameworkEvent.getBundle());
    }
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.