Examples of OSGiRuntime


Examples of gov.nasa.arc.mct.osgi.platform.OSGIRuntime

                housing.closeHousing();
            }
           
            // User may have cancelled some window closings, so verify housing count
            if (UserEnvironmentRegistry.getHousingCount() == 0) {
                OSGIRuntime osgiRuntime = OSGIRuntimeImpl.getOSGIRuntime();
                try {
                    osgiRuntime.stopOSGI();
                } catch (Exception e1) {
                    LoggerFactory.getLogger(QuitAction.class).warn(e1.getMessage(), e1);
                }
            }
        }
View Full Code Here

Examples of gov.nasa.arc.mct.osgi.platform.OSGIRuntime

                                options,
                                options[0],
                                hints);
                       
                        if (response != null && response.equals(options[0])) { // "OK"
                            OSGIRuntime osgiRuntime = OSGIRuntimeImpl.getOSGIRuntime();
                            try {
                                osgiRuntime.stopOSGI();
                            } catch (Exception e1) {
                                LoggerFactory.getLogger(MCTStandardHousing.class).warn(e1.getMessage(), e1);
                            }
                            disposeHousing();
                        }
View Full Code Here

Examples of gov.nasa.arc.mct.osgi.platform.OSGIRuntime

    private void initUserEnvironment() {
        new UserEnvironment();
    }
   
    private void startOptionalModules() {
        OSGIRuntime osgiRuntime = OSGIRuntimeImpl.getOSGIRuntime();
        osgiRuntime.startExternalBundles();
    }
View Full Code Here

Examples of org.apache.tuscany.sca.osgi.runtime.OSGiRuntime

     * Import model resolvers are matched to a specific contribution if a location uri is specified,
     *    otherwise it try to resolve agains all the other contributions
     */
    public void contributionAdded(ContributionRepository repository, Contribution contribution) {

        OSGiRuntime osgiRuntime = null;
        try {
            if (bundleProcessor.installContributionBundle(contribution) == null) {
                return;
            } else {
                osgiRuntime = OSGiRuntime.getRuntime();
            }
        } catch (Exception e) {
            return;
        }

        HashSet<Contribution> bundlesToInstall = new HashSet<Contribution>();
        // Initialize the contribution imports
        for (Import import_ : contribution.getImports()) {
            boolean initialized = false;

            if (import_ instanceof JavaImport) {
                JavaImport javaImport = (JavaImport)import_;
                String packageName = javaImport.getPackage();

                //Find a matching contribution
                if (javaImport.getLocation() != null) {
                    Contribution targetContribution = repository.getContribution(javaImport.getLocation());
                    if (targetContribution != null) {

                        // Find a matching contribution export
                        for (Export export : targetContribution.getExports()) {
                            if (export instanceof JavaExport) {
                                JavaExport javaExport = (JavaExport)export;
                                if (packageName.equals(javaExport.getPackage())) {

                                    if (osgiRuntime.findBundle(targetContribution.getLocation()) == null)
                                        bundlesToInstall.add(targetContribution);

                                    initialized = true;

                                }
                            }
                            if (initialized)
                                break;
                        }
                    }
                }
            }
            if (!initialized) {
                for (Contribution c : repository.getContributions()) {

                    // Go over all exports in the contribution
                    for (Export export : c.getExports()) {
                        // If the export matches our namespace, try to the resolve the model object
                        if (import_.match(export) && osgiRuntime.findBundle(c.getLocation()) == null) {
                            bundlesToInstall.add(c);
                        }
                    }
                }
            }
View Full Code Here

Examples of org.apache.tuscany.sca.osgi.runtime.OSGiRuntime

     * Import model resolvers are matched to a specific contribution if a location uri is specified,
     *    otherwise it try to resolve agains all the other contributions
     */
    public void contributionAdded(ContributionRepository repository, Contribution contribution) {

        OSGiRuntime osgiRuntime = null;
        try {
            if (bundleProcessor.installContributionBundle(contribution) == null) {
                return;
            } else {
                osgiRuntime = OSGiRuntime.getRuntime();
            }
        } catch (Exception e) {
            return;
        }

        HashSet<Contribution> bundlesToInstall = new HashSet<Contribution>();
        // Initialize the contribution imports
        for (Import import_ : contribution.getImports()) {
            boolean initialized = false;

            if (import_ instanceof JavaImport) {
                JavaImport javaImport = (JavaImport)import_;
                String packageName = javaImport.getPackage();

                //Find a matching contribution
                if (javaImport.getLocation() != null) {
                    Contribution targetContribution = repository.getContribution(javaImport.getLocation());
                    if (targetContribution != null) {

                        // Find a matching contribution export
                        for (Export export : targetContribution.getExports()) {
                            if (export instanceof JavaExport) {
                                JavaExport javaExport = (JavaExport)export;
                                if (packageName.equals(javaExport.getPackage())) {

                                    if (osgiRuntime.findBundle(targetContribution.getLocation()) == null)
                                        bundlesToInstall.add(targetContribution);

                                    initialized = true;

                                }
                            }
                            if (initialized)
                                break;
                        }
                    }
                }
            }
            if (!initialized) {
                for (Contribution c : repository.getContributions()) {

                    // Go over all exports in the contribution
                    for (Export export : c.getExports()) {
                        // If the export matches our namespace, try to the resolve the model object
                        if (import_.match(export) && osgiRuntime.findBundle(c.getLocation()) == null) {
                            bundlesToInstall.add(c);
                        }
                    }
                }
            }
View Full Code Here

Examples of org.apache.tuscany.sca.osgi.runtime.OSGiRuntime

     * Import model resolvers are matched to a specific contribution if a location URI is specified,
     *    otherwise it try to resolve against all the other contributions
     */
    public void contributionAdded(ContributionRepository repository, Contribution contribution) {

        OSGiRuntime osgiRuntime = null;
        try {
            if (bundleProcessor.installContributionBundle(contribution) == null) {
                return;
            } else {
                osgiRuntime = OSGiRuntime.getRuntime();
            }
        } catch (Exception e) {
            return;
        }

        HashSet<Contribution> bundlesToInstall = new HashSet<Contribution>();
        // Initialize the contribution imports
        for (Import import_ : contribution.getImports()) {
            boolean initialized = false;

            if (import_ instanceof JavaImport) {
                JavaImport javaImport = (JavaImport)import_;
                String packageName = javaImport.getPackage();

                //Find a matching contribution
                if (javaImport.getLocation() != null) {
                    Contribution targetContribution = repository.getContribution(javaImport.getLocation());
                    if (targetContribution != null) {

                        // Find a matching contribution export
                        for (Export export : targetContribution.getExports()) {
                            if (export instanceof JavaExport) {
                                JavaExport javaExport = (JavaExport)export;
                                if (packageName.equals(javaExport.getPackage())) {

                                    if (osgiRuntime.findBundle(targetContribution.getLocation()) == null)
                                        bundlesToInstall.add(targetContribution);

                                    initialized = true;

                                }
                            }
                            if (initialized)
                                break;
                        }
                    }
                }
            }
            if (!initialized) {
                for (Contribution c : repository.getContributions()) {

                    // Go over all exports in the contribution
                    for (Export export : c.getExports()) {
                        // If the export matches our namespace, try to the resolve the model object
                        if (import_.match(export) && osgiRuntime.findBundle(c.getLocation()) == null) {
                            bundlesToInstall.add(c);
                        }
                    }
                }
            }
View Full Code Here

Examples of org.apache.tuscany.sca.osgi.runtime.OSGiRuntime

     * Import model resolvers are matched to a specific contribution if a location URI is specified,
     *    otherwise it try to resolve against all the other contributions
     */
    public void contributionAdded(ContributionRepository repository, Contribution contribution) {

        OSGiRuntime osgiRuntime = null;
        try {
            if (bundleProcessor.installContributionBundle(contribution) == null) {
                return;
            } else {
                osgiRuntime = OSGiRuntime.getRuntime();
            }
        } catch (Exception e) {
            return;
        }

        HashSet<Contribution> bundlesToInstall = new HashSet<Contribution>();
        // Initialize the contribution imports
        for (Import import_ : contribution.getImports()) {
            boolean initialized = false;

            if (import_ instanceof JavaImport) {
                JavaImport javaImport = (JavaImport)import_;
                String packageName = javaImport.getPackage();

                //Find a matching contribution
                if (javaImport.getLocation() != null) {
                    Contribution targetContribution = repository.getContribution(javaImport.getLocation());
                    if (targetContribution != null) {

                        // Find a matching contribution export
                        for (Export export : targetContribution.getExports()) {
                            if (export instanceof JavaExport) {
                                JavaExport javaExport = (JavaExport)export;
                                if (packageName.equals(javaExport.getPackage())) {

                                    if (osgiRuntime.findBundle(targetContribution.getLocation()) == null)
                                        bundlesToInstall.add(targetContribution);

                                    initialized = true;

                                }
                            }
                            if (initialized)
                                break;
                        }
                    }
                }
            }
            if (!initialized) {
                for (Contribution c : repository.getContributions()) {

                    // Go over all exports in the contribution
                    for (Export export : c.getExports()) {
                        // If the export matches our namespace, try to the resolve the model object
                        if (import_.match(export) && osgiRuntime.findBundle(c.getLocation()) == null) {
                            bundlesToInstall.add(c);
                        }
                    }
                }
            }
View Full Code Here

Examples of org.apache.tuscany.sca.osgi.runtime.OSGiRuntime

     * Import model resolvers are matched to a specific contribution if a location uri is specified,
     *    otherwise it try to resolve agains all the other contributions
     */
    public void contributionAdded(ContributionRepository repository, Contribution contribution) {

        OSGiRuntime osgiRuntime = null;
        try {
            if (bundleProcessor.installContributionBundle(contribution) == null) {
                return;
            } else {
                osgiRuntime = OSGiRuntime.getRuntime();
            }
        } catch (Exception e) {
            return;
        }

        HashSet<Contribution> bundlesToInstall = new HashSet<Contribution>();
        // Initialize the contribution imports
        for (Import import_ : contribution.getImports()) {
            boolean initialized = false;

            if (import_ instanceof JavaImport) {
                JavaImport javaImport = (JavaImport)import_;
                String packageName = javaImport.getPackage();

                //Find a matching contribution
                if (javaImport.getLocation() != null) {
                    Contribution targetContribution = repository.getContribution(javaImport.getLocation());
                    if (targetContribution != null) {

                        // Find a matching contribution export
                        for (Export export : targetContribution.getExports()) {
                            if (export instanceof JavaExport) {
                                JavaExport javaExport = (JavaExport)export;
                                if (packageName.equals(javaExport.getPackage())) {

                                    if (osgiRuntime.findBundle(targetContribution.getLocation()) == null)
                                        bundlesToInstall.add(targetContribution);

                                    initialized = true;

                                }
                            }
                            if (initialized)
                                break;
                        }
                    }
                }
            }
            if (!initialized) {
                for (Contribution c : repository.getContributions()) {

                    // Go over all exports in the contribution
                    for (Export export : c.getExports()) {
                        // If the export matches our namespace, try to the resolve the model object
                        if (import_.match(export) && osgiRuntime.findBundle(c.getLocation()) == null) {
                            bundlesToInstall.add(c);
                        }
                    }
                }
            }
View Full Code Here

Examples of org.apache.tuscany.sca.osgi.runtime.OSGiRuntime

     * Import model resolvers are matched to a specific contribution if a location uri is specified,
     *    otherwise it try to resolve agains all the other contributions
     */
    public void contributionAdded(ContributionRepository repository, Contribution contribution) {

        OSGiRuntime osgiRuntime = null;
        try {
            if (bundleProcessor.installContributionBundle(contribution) == null) {
                return;
            } else {
                osgiRuntime = OSGiRuntime.getRuntime();
            }
        } catch (Exception e) {
            return;
        }

        HashSet<Contribution> bundlesToInstall = new HashSet<Contribution>();
        // Initialize the contribution imports
        for (Import import_ : contribution.getImports()) {
            boolean initialized = false;

            if (import_ instanceof JavaImport) {
                JavaImport javaImport = (JavaImport)import_;
                String packageName = javaImport.getPackage();

                //Find a matching contribution
                if (javaImport.getLocation() != null) {
                    Contribution targetContribution = repository.getContribution(javaImport.getLocation());
                    if (targetContribution != null) {

                        // Find a matching contribution export
                        for (Export export : targetContribution.getExports()) {
                            if (export instanceof JavaExport) {
                                JavaExport javaExport = (JavaExport)export;
                                if (packageName.equals(javaExport.getPackage())) {

                                    if (osgiRuntime.findBundle(targetContribution.getLocation()) == null)
                                        bundlesToInstall.add(targetContribution);

                                    initialized = true;

                                }
                            }
                            if (initialized)
                                break;
                        }
                    }
                }
            }
            if (!initialized) {
                for (Contribution c : repository.getContributions()) {

                    // Go over all exports in the contribution
                    for (Export export : c.getExports()) {
                        // If the export matches our namespace, try to the resolve the model object
                        if (import_.match(export) && osgiRuntime.findBundle(c.getLocation()) == null) {
                            bundlesToInstall.add(c);
                        }
                    }
                }
            }
View Full Code Here

Examples of org.jboss.gravia.runtime.osgi.internal.OSGiRuntime

        this.syscontext = syscontext;
    }

    @Override
    public Runtime createRuntime(PropertiesProvider props) {
        return new OSGiRuntime(syscontext, props);
    }
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.