Examples of waitForStop()


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

        if (args.length == 3 && args[2].equalsIgnoreCase("wait-before-stopping")) {
            System.out.println("Hit enter to continue");
            System.in.read(); //
        }
        f.stop();
        f.waitForStop(0);
        long t5 = System.currentTimeMillis();
        logger.log(Level.INFO, LogFacade.BUNDLE_STOP_TIME, (t5 - t4));
        logger.log(Level.INFO, LogFacade.TOTAL_TIME, (t5-t0));
        out.printf("%d,%d,%d,%d,%d,%d,%d\n", t1-t0, t2-t1, t3-t2, t4-t3, t4-t0, t5-t4, t5-t0);
    }
View Full Code Here

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

        if (args.length == 3 && args[2].equalsIgnoreCase("wait-before-stopping")) {
            System.out.println("Hit enter to continue");
            System.in.read(); //
        }
        f.stop();
        f.waitForStop(0);
        long t5 = System.currentTimeMillis();
        logger.logp(Level.INFO, "BundleProvisioner", "main", "time taken to stop = {0} ms", new Object[]{t5 - t4});
        logger.logp(Level.INFO, "BundleProvisioner", "main", "Total time taken = {0}", new Object[]{t5-t0});
        out.printf("%d,%d,%d,%d,%d,%d,%d\n", t1-t0, t2-t1, t3-t2, t4-t3, t4-t0, t5-t4, t5-t0);
    }
View Full Code Here

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

        if (args.length == 3 && args[2].equalsIgnoreCase("wait-before-stopping")) {
            System.out.println("Hit enter to continue");
            System.in.read(); //
        }
        f.stop();
        f.waitForStop(0);
        long t5 = System.currentTimeMillis();
        logger.log(Level.INFO, LogFacade.BUNDLE_STOP_TIME, (t5 - t4));
        logger.log(Level.INFO, LogFacade.TOTAL_TIME, (t5-t0));
        out.printf("%d,%d,%d,%d,%d,%d,%d\n", t1-t0, t2-t1, t3-t2, t4-t3, t4-t0, t5-t4, t5-t0);
    }
View Full Code Here

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

            framework.start();

            logVerbose("Startup complete...");

            framework.waitForStop(0);
        }
        catch (Exception e) {
            e.printStackTrace(System.err);
            rc = 1;
        }
View Full Code Here

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

          createAndRunMainThreadExecutor(fwContext, "main");

      // SHUTDOWN
      try {
        logger.info("Waiting for the framework to stop.");
        framework.waitForStop(0);
        if(installerThread != null)
          installerThread.interrupt();
        logger.info("Framework stopped.");
      } catch (InterruptedException e) {
        // Ignore
View Full Code Here

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

   {
      try
      {
         Framework framework = frameworkInst.get();
         framework.stop();
         framework.waitForStop(3000);
      }
      catch (RuntimeException rte)
      {
         throw rte;
      }
View Full Code Here

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

        if (args.length == 3 && args[2].equalsIgnoreCase("wait-before-stopping")) {
            System.out.println("Hit enter to continue");
            System.in.read(); //
        }
        f.stop();
        f.waitForStop(0);
        long t5 = System.currentTimeMillis();
        logger.logp(Level.INFO, "BundleProvisioner", "main", "time taken to stop = {0} ms", new Object[]{t5 - t4});
        logger.logp(Level.INFO, "BundleProvisioner", "main", "Total time taken = {0}", new Object[]{t5-t0});
        out.printf("%d,%d,%d,%d,%d,%d,%d\n", t1-t0, t2-t1, t3-t2, t4-t3, t4-t0, t5-t4, t5-t0);
    }
View Full Code Here

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

    public void stop() throws LifecycleException {
        try {
            Framework framework = frameworkInst.get();
            framework.stop();
            framework.waitForStop(3000);
        } catch (RuntimeException rte) {
            throw rte;
        } catch (Exception ex) {
            throw new LifecycleException("Cannot stop embedded OSGi Framework", ex);
        }
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.