Package org.jboss.gravia.runtime.spi

Examples of org.jboss.gravia.runtime.spi.PropertiesProvider


        return builder.install();
    }

    @Override
    public void start(StartContext startContext) throws StartException {
        PropertiesProvider propsProvider = new DefaultPropertiesProvider(getRuntimeProperties(), true);
        Runtime runtime = RuntimeLocator.createRuntime(new WildFlyRuntimeFactory(), propsProvider);
        runtime.init();

        // Initialize ConfigurationAdmin content
        Object configsDir = propsProvider.getProperty(Constants.PROPERTY_CONFIGURATIONS_DIR);
        ActivationSupport.initConfigurationAdmin(new File((String) configsDir));
    }
View Full Code Here


        return builder.install();
    }

    @Override
    public void start(StartContext startContext) throws StartException {
        PropertiesProvider propsProvider = new DefaultPropertiesProvider(initialProperties(), true);
        runtime = RuntimeLocator.createRuntime(new WildFlyRuntimeFactory(), propsProvider);
        runtime.init();
    }
View Full Code Here

public final class OSGiRuntimeActivator implements BundleActivator {

    @Override
    public void start(BundleContext context) throws Exception {
        BundleContext syscontext = context.getBundle(0).getBundleContext();
        PropertiesProvider propsProvider = new OSGiPropertiesProvider(syscontext);
        Runtime runtime = RuntimeLocator.createRuntime(new OSGiRuntimeFactory(syscontext), propsProvider);
        runtime.init();
    }
View Full Code Here

    public static Runtime getRuntime() {
        return RuntimeLocator.getRuntime();
    }

    public static Runtime createRuntime(BundleContext syscontext) {
        PropertiesProvider propsProvider = new OSGiPropertiesProvider(syscontext);
        return RuntimeLocator.createRuntime(new OSGiRuntimeFactory(syscontext), propsProvider);
    }
View Full Code Here

*/
public final class OSGiRuntimeActivator implements BundleActivator {

    @Override
    public void start(BundleContext context) throws Exception {
        PropertiesProvider propsProvider = new OSGiPropertiesProvider(context);
        Runtime runtime = RuntimeLocator.createRuntime(new OSGiRuntimeFactory(context), propsProvider);
        runtime.init();
    }
View Full Code Here

    public OSGiPropertiesProvider(BundleContext bundleContext) {
        this(bundleContext, null);
    }

    public OSGiPropertiesProvider(BundleContext bundleContext, String environmentVariablePrefix) {
        PropertiesProvider system = new SystemPropertiesProvider();
        PropertiesProvider env =  environmentVariablePrefix != null ? new EnvPropertiesProvider(environmentVariablePrefix) : new EnvPropertiesProvider(system);

        this.delegate = new SubstitutionPropertiesProvider(
                new CompositePropertiesProvider(
                        new BundleContextPropertiesProvider(bundleContext),
                        system,
View Full Code Here

    @Override
    public void contextInitialized(ServletContextEvent event) {

        // Create the runtime
        ServletContext servletContext = event.getServletContext();
        PropertiesProvider propsProvider = new TomcatPropertiesProvider(servletContext);
        Runtime runtime = RuntimeLocator.createRuntime(new TomcatRuntimeFactory(servletContext), propsProvider);
        runtime.init();

        // HttpService integration
        ModuleContext moduleContext = runtime.getModuleContext();
View Full Code Here

        resolverRegistration = syscontext.registerService(Resolver.class, resolver, null);
        return resolver;
    }

    private Repository registerRepositoryService(final Runtime runtime) {
        PropertiesProvider propertyProvider = new RuntimePropertiesProvider(runtime);
        Repository repository = new DefaultRepository(propertyProvider);
        ModuleContext syscontext = runtime.getModuleContext();
        repositoryRegistration =  RepositoryRuntimeRegistration.registerRepository(syscontext, repository);
        return repository;
    }
View Full Code Here

public final class OSGiRuntimeActivator implements BundleActivator {

    @Override
    public void start(BundleContext context) throws Exception {
        BundleContext syscontext = context.getBundle(0).getBundleContext();
        PropertiesProvider propsProvider = new BundleContextPropertiesProvider(syscontext);
        Runtime runtime = RuntimeLocator.createRuntime(new OSGiRuntimeFactory(syscontext), propsProvider);
        runtime.init();
    }
View Full Code Here

    public static Runtime getRuntime() {
        return RuntimeLocator.getRuntime();
    }

    public static Runtime createRuntime(BundleContext syscontext) {
        PropertiesProvider propsProvider = new BundleContextPropertiesProvider(syscontext);
        return RuntimeLocator.createRuntime(new OSGiRuntimeFactory(syscontext), propsProvider);
    }
View Full Code Here

TOP

Related Classes of org.jboss.gravia.runtime.spi.PropertiesProvider

Copyright © 2018 www.massapicom. 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.