Examples of VFSClassLoaderFactory


Examples of org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory

      assertManagedProperty(mo, "excluded", String.class, "Excluded");
   }
  
   public void testSetExcludedExportPackages() throws Exception
   {
      VFSClassLoaderFactory test = new VFSClassLoaderFactory();
      test.setExcludedExportPackages("ExcludedExport");
      ManagedObject mo = assertManagedObject(test);
      assertManagedProperty(mo, "excludedExport", String.class, "ExcludedExport");
   }
View Full Code Here

Examples of org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory

      assertManagedProperty(mo, "excludedExport", String.class, "ExcludedExport");
   }
  
   public void testSetImportAll() throws Exception
   {
      VFSClassLoaderFactory test = new VFSClassLoaderFactory();
      test.setImportAll(true);
      ManagedObject mo = assertManagedObject(test);
      assertManagedProperty(mo, "importAll", Boolean.class, true);
   }
View Full Code Here

Examples of org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory

      assertManagedProperty(mo, "importAll", Boolean.class, true);
   }
  
   public void testJ2seClassLoadingComplaince() throws Exception
   {
      VFSClassLoaderFactory test = new VFSClassLoaderFactory();
      test.setJ2seClassLoadingCompliance(false);
      ManagedObject mo = assertManagedObject(test);
      assertManagedProperty(mo, "parentFirst", Boolean.class, false);
   }
View Full Code Here

Examples of org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory

      assertManagedProperty(mo, "parentFirst", Boolean.class, false);
   }
  
   public void testCacheable() throws Exception
   {
      VFSClassLoaderFactory test = new VFSClassLoaderFactory();
      test.setCacheable(false);
      ManagedObject mo = assertManagedObject(test);
      assertManagedProperty(mo, "cache", Boolean.class, false);
   }
View Full Code Here

Examples of org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory

      assertManagedProperty(mo, "cache", Boolean.class, false);
   }
  
   public void testBlackList() throws Exception
   {
      VFSClassLoaderFactory test = new VFSClassLoaderFactory();
      test.setBlackListable(false);
      ManagedObject mo = assertManagedObject(test);
      assertManagedProperty(mo, "blackList", Boolean.class, false);
   }
View Full Code Here

Examples of org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory

      assertManagedProperty(mo, "blackList", Boolean.class, false);
   }
  
   public void testSetSystem() throws Exception
   {
      VFSClassLoaderFactory test = new VFSClassLoaderFactory();
      test.setClassLoaderSystemName("test");
      ManagedObject mo = assertManagedObject(test);
      assertManagedProperty(mo, "system", String.class, "test");
   }
View Full Code Here

Examples of org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory

      assertManagedProperty(mo, "system", String.class, "test");
   }
  
   public void testSetRoots() throws Exception
   {
      VFSClassLoaderFactory test = new VFSClassLoaderFactory();
      List<String> roots = Arrays.asList("test1", "test2");
      test.setRoots(roots);
      ManagedObject mo = assertManagedObject(test);
      Field field = getClass().getField("rootsSignature");
      assertManagedProperty(mo, "roots", field.getGenericType(), roots);
   }
View Full Code Here

Examples of org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory

   public static List<String> rootsSignature;
  
   public void testCapabilities() throws Exception
   {
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      VFSClassLoaderFactory test = new VFSClassLoaderFactory();
      test.getCapabilities().addCapability(factory.createModule("module"));
      test.getCapabilities().addCapability(factory.createPackage("package"));
      ManagedObject mo = assertManagedObject(test);
      assertManagedProperty(mo, "requirements", RequirementsMetaData.class, test.getRequirements());
   }
View Full Code Here

Examples of org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory

   }
  
   public void testRequirements() throws Exception
   {
      ClassLoadingMetaDataFactory factory = ClassLoadingMetaDataFactory.getInstance();
      VFSClassLoaderFactory test = new VFSClassLoaderFactory();
      test.getRequirements().addRequirement(factory.createRequireModule("module"));
      test.getRequirements().addRequirement(factory.createRequirePackage("package"));
      ManagedObject mo = assertManagedObject(test);
      assertManagedProperty(mo, "requirements", RequirementsMetaData.class, test.getRequirements());
   }
View Full Code Here

Examples of org.jboss.classloading.spi.vfs.metadata.VFSClassLoaderFactory

      deploy(url);
      validate();

      try
      {
         VFSClassLoaderFactory factory = new VFSClassLoaderFactory("ClientLauncherClassLoader");
         ArrayList<String> roots = new ArrayList<String>();
         // This will come from the client metadata
         for(String path : cp)
            roots.add(path);
         factory.setRoots(roots);
         // Do we have to export all packages? Not going to know them...
         int lastDot = clientClass.lastIndexOf('.');
         if(lastDot > 0)
         {
            String clientPackage = clientClass.substring(0, lastDot);
            ClassLoadingMetaDataFactory cfactory = ClassLoadingMetaDataFactory.getInstance();
            factory.getCapabilities().addCapability(cfactory.createModule(clientPackage));
            factory.getCapabilities().addCapability(cfactory.createPackage(clientPackage));
         }
         //factory.setIncluded(ClassFilter.JAVA_ONLY);

         ArrayList<BeanMetaDataFactory> beanFactories = new ArrayList<BeanMetaDataFactory>();
         beanFactories.add(factory);
         BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("ClientContainer", ClientContainer.class.getName());
         // ClientContainer(Object metaData, String mainClass, String applicationClientName)
         Object metaData = null;
         builder.addConstructorParameter(Object.class.getName(), metaData);
         builder.addConstructorParameter(Class.class.getName(), clientClass);
         builder.addConstructorParameter(String.class.getName(), clientName);
         String classLoaderName = factory.getContextName();
         if(classLoaderName == null)
            classLoaderName = factory.getName() + ":" + factory.getVersion();
         ValueMetaData classLoader = builder.createInject(classLoaderName);
         builder.setClassLoader(classLoader);
         BeanMetaData clientContainerMD = builder.getBeanMetaData();
  
         AbstractKernelDeployment deployment = new AbstractKernelDeployment();
         deployment.setName(factory.getName() + ":" + factory.getVersion());
         if(clientContainerMD instanceof BeanMetaDataFactory)
         {
            BeanMetaDataFactory bmdf = (BeanMetaDataFactory) clientContainerMD;
            beanFactories.add(bmdf);
         }
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.