Package org.jdesktop.wonderland.modules.spi

Examples of org.jdesktop.wonderland.modules.spi.ModuleDeployerSPI


        while (it.hasNext() == true) {
            /*
             * Fetch the module part types that the deployer supports. If none,
             * just continue to the next module.
             */
            ModuleDeployerSPI deployer = it.next();
            String[] partTypes = deployer.getTypes();
            if (partTypes == null) {
                continue;
            }
           
            /*
             * Loop through each part type and see if there is a module part
             */
            for (String partType : partTypes) {
                if (parts.containsKey(partType) == true) {
                    try {
                        logger.info("[DEPOY] Deploying " + module.getName() + " to " + deployer.getName());
                        deployer.deploy(partType, module, parts.get(partType));
                    } catch (java.lang.Exception excp) {
                        /*
                         * Catch all exceptions here. Report them and pass them
                         * up as DeployerException, but continue to
                         * the remainder of the deployers.
                         */
                        logger.log(Level.WARNING, "[DEPLOY] Failed", excp);
                        deployException = new DeployerException(deployer.getName(), module);
                    }
                }
            }
        }
       
View Full Code Here


        while (it.hasNext() == true) {
            /*
             * Fetch the module part types that the deployer supports. If none,
             * just continue to the next module.
             */
            ModuleDeployerSPI deployer = it.next();
            String[] partTypes = deployer.getTypes();
            if (partTypes == null) {
                continue;
            }
           
            /*
             * Loop through each part type and see if there is a module part
             */
            for (String partType : partTypes) {
                if (parts.containsKey(partType) == true) {
                    try {
                        deployer.undeploy(partType, module, parts.get(partType));
                    } catch (java.lang.Exception excp) {
                        /*
                         * Catch all exceptions here. Report them and pass them
                         * up as DeployerException, but continue to
                         * the remainder of the deployers.
                         */
                        logger.log(Level.WARNING, "[UNDEPLOY] Failed", excp);
                        undeployException = new DeployerException(deployer.getName(), module);
                    }
                }
            }
        }
       
View Full Code Here

         * part. If so, ask the deployer whether it is ready to deploy
         */
        Map<String, ModulePart> parts = module.getParts();
        Iterator<ModuleDeployerSPI> it = getDeployers().iterator();
        while (it.hasNext() == true) {
            ModuleDeployerSPI deployer = it.next();
            String[] partTypes = deployer.getTypes();
            if (partTypes == null) {
                continue;
            }
           
            /* Loop through each part type and see if there is a module part */
            for (String partType : partTypes) {
                if (parts.containsKey(partType) == true) {
                    if (deployer.isDeployable(partType, module, parts.get(partType)) == false) {
                        res.addReason("Unable to deploy part " + partType +
                                      " with deployer " + deployer.getName() +
                                      " class " + deployer.getClass().getName());
                        res.setResult(false);
                        return res;
                    }
                }
            }
View Full Code Here

         * part. If so, ask the deployer whether it is ready to deploy
         */
        Map<String, ModulePart> parts = module.getParts();
        Iterator<ModuleDeployerSPI> it = getDeployers().iterator();
        while (it.hasNext() == true) {
            ModuleDeployerSPI deployer = it.next();
            String[] partTypes = deployer.getTypes();
            if (partTypes == null) {
                continue;
            }
           
            /* Loop through each part type and see if there is a module part */
            for (String partType : partTypes) {
                if (parts.containsKey(partType) == true) {
                    logger.warning("For module " + module.getName() + " can " +
                            "undeploy part " + partType + " with deployer " +
                            deployer.getName() + " class " + deployer.getClass().getName());
                    if (deployer.isUndeployable(partType, module, parts.get(partType)) == false) {
                        res.addReason("Unable to undeploy part " + partType +
                                      " with deployer " + deployer.getName() +
                                      " class " + deployer.getClass().getName());
                        res.setResult(false);
                        return res;
                    }
                }
            }
View Full Code Here

                continue;
            }

            // this is a new deployer.  Add an instance.
            try {
                ModuleDeployerSPI deployer = (ModuleDeployerSPI) clazz.newInstance();
                deployers.put(clazz, deployer);
            } catch (InstantiationException ex) {
                logger.log(Level.WARNING, "[DEPLOY] INSTANTIATE", ex);
            } catch (IllegalAccessException ex) {
                logger.log(Level.WARNING, "[DEPLOY] INSTANTIATE", ex);
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.modules.spi.ModuleDeployerSPI

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.