Package org.jboss.deployers.plugins.main

Examples of org.jboss.deployers.plugins.main.MainDeployerImpl


               AbstractController controller = (AbstractController)kernel.getController();

               serviceController.setMBeanServer(mbeanServer);
               serviceController.setKernel(kernel);

               MainDeployerImpl mainDeployer = new MainDeployerImpl();
               mainDeployer.setStructuralDeployers(new StructuralDeployers()
               {
                  public DeploymentContext determineStructure(Deployment deployment) throws DeploymentException
                  {
                     return new AbstractDeploymentContext("SMD", "");
                  }
               });
               DeployersImpl deployersImpl = new DeployersImpl(controller);
               deployersImpl.addDeployer(new ServiceDeployer(serviceController));
               deployersImpl.addDeployer(new ServiceDeploymentDeployer());
               deployersImpl.addDeployer(new CLDeployer());
               deployersImpl.addDeployer(new SMDParsingDeployer());
               mainDeployer.setDeployers(deployersImpl);

               Deployment deployment = new AbstractDeployment("SMD");
               mainDeployer.addDeployment(deployment);
               mainDeployer.process();

               mainDeployer.checkComplete(deployment);
               fail("Should not be here");
            }
            catch (Exception e)
            {
               assertInstanceOf(e, IncompleteDeploymentException.class);              
View Full Code Here


   public void testExtensionProviders() throws Throwable
   {
      KernelController controller = getController();

      MainDeployerImpl main = new MainDeployerImpl();
      main.setStructuralDeployers(createStructuralDeployers());

      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("JARStructure", ExposedJARStructure.class.getName());
      controller.install(builder.getBeanMetaData());
      builder = BeanMetaDataBuilder.createBuilder("FileStructure", ExposedFileStructure.class.getName());
      controller.install(builder.getBeanMetaData());

      ControllerContext jarContext = controller.getInstalledContext("JARStructure");
      assertNotNull(jarContext);
      ExposedJARStructure jarStructure = (ExposedJARStructure)jarContext.getTarget();
      assertNotNull(jarStructure);
      addStructureDeployer(main, jarStructure);

      ControllerContext fileContext = controller.getInstalledContext("FileStructure");
      assertNotNull(fileContext);
      ExposedFileStructure fileStructure = (ExposedFileStructure)fileContext.getTarget();
      assertNotNull(fileStructure);
      addStructureDeployer(main, fileStructure);

      Set<FileMatcher> matchers = fileStructure.getMatchers();
      assertNotNull(matchers);
      assertEmpty(matchers);

      builder = BeanMetaDataBuilder.createBuilder("RhtDeployer", TestExtensionDeployer.class.getName());
      builder.addConstructorParameter(String.class.getName(), ".rht");
      controller.install(builder.getBeanMetaData());
      assertEquals(1, matchers.size());

      builder = BeanMetaDataBuilder.createBuilder("JbsDeployer", TestExtensionDeployer.class.getName());
      builder.addConstructorParameter(String.class.getName(), ".jbs");
      controller.install(builder.getBeanMetaData());
      assertEquals(2, matchers.size());

      Set<String> suffixes = jarStructure.getSuffixes();
      assertTrue(suffixes.contains(".rhts"));
      assertTrue(suffixes.contains(".jbss"));

      Deployers deployers = createDeployers();
      main.setDeployers(deployers);

      FeedbackDeployer rhtDeployer = addDeployer(main, "RhtDeployer");
      FeedbackDeployer jbsDeployer = addDeployer(main, "JbsDeployer");

      Deployment deploymentRHT = createDeployment("/matchers", "some.rhts");
View Full Code Here

   }
  
   protected DeployerClient createMainDeployer(Deployer... deployers)
   {
      log.debug("createMainDeployer");
      MainDeployerImpl mainDeployer = new MainDeployerImpl();
      StructuralDeployers structure = createStructuralDeployers();
      mainDeployer.setStructuralDeployers(structure);
      Deployers theDeployers = createDeployers();
      mainDeployer.setDeployers(theDeployers);
      ManagedDeploymentCreator mdc = createManagedDeploymentCreator();
      mainDeployer.setMgtDeploymentCreator(mdc);
      if (deployers != null)
      {
         for (Deployer deployer : deployers)
            addDeployer(mainDeployer, deployer);
      }
View Full Code Here

      return di;
   }

   protected void addDeployer(DeployerClient main, Deployer deployer)
   {
      MainDeployerImpl mainDeployerImpl = (MainDeployerImpl) main;
      DeployersImpl deployersImpl = (DeployersImpl) mainDeployerImpl.getDeployers();
      deployersImpl.addDeployer(deployer);
   }
View Full Code Here

      deployersImpl.addDeployer(deployer);
   }
  
   protected void removeDeployer(DeployerClient main, Deployer deployer)
   {
      MainDeployerImpl mainDeployerImpl = (MainDeployerImpl) main;
      DeployersImpl deployersImpl = (DeployersImpl) mainDeployerImpl.getDeployers();
      deployersImpl.removeDeployer(deployer);
   }
View Full Code Here

   }
  
   protected void setDeployers(DeployerClient main, Set<Deployer> deployers)
   {
      log.debug("setDeployers");
      MainDeployerImpl mainDeployerImpl = (MainDeployerImpl) main;
      DeployersImpl deployersImpl = (DeployersImpl) mainDeployerImpl.getDeployers();
      deployersImpl.setDeployers(deployers);
   }
View Full Code Here

      deployersImpl.setDeployers(deployers);
   }
  
   protected Set<DeployerWrapper> getDeployers(DeployerClient main)
   {
      MainDeployerImpl mainDeployerImpl = (MainDeployerImpl) main;
      DeployersImpl deployersImpl = (DeployersImpl) mainDeployerImpl.getDeployers();
      return deployersImpl.getDeployerWrappers();
   }
View Full Code Here

   }
  
   @Deprecated
   protected DeploymentContext getDeploymentContext(DeployerClient main, String name)
   {
      MainDeployerImpl mainDeployerImpl = (MainDeployerImpl) main;
      return mainDeployerImpl.getDeploymentContext(name);
   }
View Full Code Here

      return context;
   }
  
   protected DeploymentUnit getDeploymentUnit(DeployerClient main, String name)
   {
      MainDeployerImpl mainDeployerImpl = (MainDeployerImpl) main;
      return mainDeployerImpl.getDeploymentUnit(name);
   }
View Full Code Here

      return structure;
   }
  
   protected void addStructureDeployer(DeployerClient main, StructureDeployer deployer)
   {
      MainDeployerImpl mainDeployerImpl = (MainDeployerImpl) main;
      VFSStructuralDeployersImpl structure = (VFSStructuralDeployersImpl) mainDeployerImpl.getStructuralDeployers();
      structure.addDeployer(deployer);
   }
View Full Code Here

TOP

Related Classes of org.jboss.deployers.plugins.main.MainDeployerImpl

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.