Examples of newFramework()


Examples of org.osgi.framework.launch.FrameworkFactory.newFramework()

            BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
            factoryClass = br.readLine();
            br.close();
        }
        FrameworkFactory factory = (FrameworkFactory) classLoader.loadClass(factoryClass).newInstance();
        framework = factory.newFramework(new StringMap(configProps, false));
        framework.init();
        // Process properties
        loadStartupProperties(configProps);
        processAutoProperties(framework.getBundleContext());
        framework.start();
View Full Code Here

Examples of org.osgi.framework.launch.FrameworkFactory.newFramework()

        Map<String, String> configuration = new HashMap<String, String>();
        configuration.put(Constants.FRAMEWORK_STORAGE, "target/papoose");

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

        framework.init();

        Bundle systemBundle = framework.getBundleContext().getBundle(0);
        BundleContext context = systemBundle.getBundleContext();
View Full Code Here

Examples of org.osgi.framework.launch.FrameworkFactory.newFramework()

        {
        }

        framework.stop();

        framework = factory.newFramework(configuration);
        framework.init();

        systemBundle = framework.getBundleContext().getBundle(0);
        context = systemBundle.getBundleContext();
View Full Code Here

Examples of org.osgi.framework.launch.FrameworkFactory.newFramework()

    {
        Map<String, String> configuration = new HashMap<String, String>();
        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());
View Full Code Here

Examples of org.osgi.framework.launch.FrameworkFactory.newFramework()

        factory = (FrameworkFactory) osgiFrameworkFactoryClazz
            .newInstance();
      } catch (Exception e) {
        throw new RuntimeException("初始化osgiFrameworkFactoryClass失败!", e);
      }
      framework = factory.newFramework(osgiFrameworkConfigMap);

      logger.info("正在启动OSGi框架,OSGi框架工厂类: " + osgiFrameworkFactoryClass);
    }

    long osgiFrameworkStartTime = System.currentTimeMillis();
View Full Code Here

Examples of org.osgi.framework.launch.FrameworkFactory.newFramework()

        Map<Object, Object> props = new HashMap<Object, Object>();
        props.put("osgi.clean", "true");
        props.put("osgi.instance.area", new File("target/workspace").toURI().toString());
        props.put("osgi.install.area", new File("target/eclipse").toURI().toString());
        props.put("osgi.configuration.area", new File("target/eclipse").toURI().toString());
        framework = factory.newFramework(props);
        framework.start();
        return framework.getBundleContext();
    }

    public BundleContext start() {
View Full Code Here

Examples of org.osgi.framework.launch.FrameworkFactory.newFramework()

                }
                propMap.putAll(props);
            }
        }
        propMap.putAll(properties);
        return factory.newFramework(propMap);
    }

    public boolean isEquinox() {
        return isEquinox;
    }
View Full Code Here

Examples of org.osgi.framework.launch.FrameworkFactory.newFramework()

            BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
            factoryClass = br.readLine();
            br.close();
        }
        FrameworkFactory factory = (FrameworkFactory) classLoader.loadClass(factoryClass).newInstance();
        framework = factory.newFramework(new StringMap(configProps, false));
        framework.init();
        // Process properties
        loadStartupProperties(configProps);
        processAutoProperties(framework.getBundleContext());
        framework.start();
View Full Code Here

Examples of org.osgi.framework.launch.FrameworkFactory.newFramework()

        final Map<String, String> configMap = new HashMap<String, String>(2);
        // Cleans framework before first init. Subsequent init invocations do not clean framework.
        configMap.put("org.osgi.framework.storage.clean", "onFirstInit");
        // Delegates loading of endorsed libraries to JVM classloader
        // config.put("org.osgi.framework.bootdelegation", "javax.*,org.w3c.*,org.xml.*");
        OsgiFramework = factory.newFramework(configMap);
        OsgiFramework.init();
        OsgiFramework.start();
    }

}
View Full Code Here

Examples of org.osgi.framework.launch.FrameworkFactory.newFramework()

        final Map<String, String> configMap = new HashMap<String, String>(2);
        // Cleans framework before first init. Subsequent init invocations do not clean framework.
        configMap.put("org.osgi.framework.storage.clean", "onFirstInit");
        // Delegates loading of endorsed libraries to JVM classloader
        // config.put("org.osgi.framework.bootdelegation", "javax.*,org.w3c.*,org.xml.*");
        OsgiFramework = factory.newFramework(configMap);
        OsgiFramework.init();
        OsgiFramework.start();
    }

}
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.