Package org.jboss.managed.api.annotation

Examples of org.jboss.managed.api.annotation.ManagementDeployment


    */
   public ManagedDeployment build(DeploymentUnit unit,
         Map<String, ManagedObject> unitMOs,
         ManagedDeployment parent)
   {
      ManagementDeployment mdAnnotation = null;
      HashMap<String, ManagedObject> validUnitMOs = new HashMap<String, ManagedObject>();
      for(String name : unitMOs.keySet())
      {
         // TODO: why should there be null ManagedObjects?
         ManagedObject mo = unitMOs.get(name);
         if(mo == null)
            continue;
         validUnitMOs.put(name, mo);
         Map<String, Annotation> annotations = mo.getAnnotations();
         if(annotations != null && mdAnnotation == null)
            mdAnnotation = (ManagementDeployment) annotations.get(ManagementDeployment.class.getName());
      }
      String simpleName = unit.getSimpleName();
      String[] types = {};
      if(mdAnnotation != null)
      {
         String mdaSimpleName = mdAnnotation.simpleName();
         if(mdaSimpleName.length() > 0 && ManagementConstants.GENERATED.equals(mdaSimpleName) == false)
            simpleName = mdAnnotation.simpleName();
         types = mdAnnotation.types();
      }
     
      ManagedDeployment md = new ManagedDeploymentImpl(unit.getName(), simpleName, parent, validUnitMOs);
      if(types.length > 0)
      {
View Full Code Here


         beanInfo = getBeanInfo(targetInterface);
         classInfo = beanInfo.getClassInfo();
      }
      HashMap<String, Annotation> moAnnotations = new HashMap<String, Annotation>();
      moAnnotations.put(ManagementObject.class.getName(), managementObject);
      ManagementDeployment mnagementDeployment = getAnnotation(ManagementDeployment.class, classInfo, metaData);
      if(mnagementDeployment != null)
         moAnnotations.put(ManagementDeployment.class.getName(), mnagementDeployment);
      ManagementObjectID moID = getAnnotation(ManagementObjectID.class, classInfo, metaData);
      if (moID != null)
         moAnnotations.put(ManagementObjectID.class.getName(), moID);
View Full Code Here

      ManagedObject mo = initManagedObject(destinations);
      assertNotNull(mo);
      Map<String, Annotation> annotations = mo.getAnnotations();
      getLog().info(annotations);
      ManagementDeployment mda = (ManagementDeployment) annotations.get(ManagementDeployment.class.getName());
      assertNotNull(mda);
      assertEquals(DeploymentPhase.APPLICATION, mda.phase());
      assertEquals(1, mda.types().length);
      assertEquals("jms", mda.types()[0]);

      // Create a ManagedDeployment for the root MO
      Map<String, ManagedObject> unitMOs = Collections.singletonMap(JmsDestinations.class.getName(), mo);
      ManagedDeploymentImpl md = new ManagedDeploymentImpl("testManagementDeploymentMO",
            "testManagementDeploymentMO", DeploymentPhase.APPLICATION, null, unitMOs);
View Full Code Here

         beanInfo = getBeanInfo(targetInterface);
         classInfo = beanInfo.getClassInfo();
      }
      HashMap<String, Annotation> moAnnotations = new HashMap<String, Annotation>();
      moAnnotations.put(ManagementObject.class.getName(), managementObject);
      ManagementDeployment mnagementDeployment = getAnnotation(ManagementDeployment.class, classInfo, metaData);
      if(mnagementDeployment != null)
         moAnnotations.put(ManagementDeployment.class.getName(), mnagementDeployment);
      ManagementObjectID moID = getAnnotation(ManagementObjectID.class, classInfo, metaData);
      if (moID != null)
         moAnnotations.put(ManagementObjectID.class.getName(), moID);
View Full Code Here

      JmsDestinations destinations = new JmsDestinations();
      ManagedObject mo = initManagedObject(destinations);
      assertNotNull(mo);
      Map<String, Annotation> annotations = mo.getAnnotations();
      getLog().info(annotations);
      ManagementDeployment mda = (ManagementDeployment) annotations.get(ManagementDeployment.class.getName());
      assertNotNull(mda);
      assertEquals(DeploymentPhase.APPLICATION, mda.phase());
      assertEquals(1, mda.types().length);
      assertEquals("jms", mda.types()[0]);
   }
View Full Code Here

   public ManagedDeployment build(DeploymentUnit unit,
         Map<String, ManagedObject> unitMOs,
         ManagedDeployment parent)
   {
      DeploymentPhase phase = unit.getAttachment(DeploymentPhase.class);
      ManagementDeployment mdAnnotation = null;
      HashMap<String, ManagedObject> validUnitMOs = new HashMap<String, ManagedObject>();
      for(String name : unitMOs.keySet())
      {
         // TODO: why should there be null ManagedObjects?
         ManagedObject mo = unitMOs.get(name);
         if(mo == null)
            continue;
         validUnitMOs.put(name, mo);
         Map<String, Annotation> annotations = mo.getAnnotations();
         if(annotations != null && mdAnnotation == null)
            mdAnnotation = (ManagementDeployment) annotations.get(ManagementDeployment.class.getName());
      }
      String simpleName = unit.getSimpleName();
      String[] types = {};
      if(mdAnnotation != null)
      {
         if(phase == null)
            phase = mdAnnotation.phase();
         String mdaSimpleName = mdAnnotation.simpleName();
         if(mdaSimpleName.length() > 0 && ManagementConstants.GENERATED.equals(mdaSimpleName) == false)
            simpleName = mdAnnotation.simpleName();
         types = mdAnnotation.types();
      }
      if( phase == null )
         phase = DeploymentPhase.APPLICATION;
     
      ManagedDeployment md = new ManagedDeploymentImpl(unit.getName(), simpleName, phase, parent, validUnitMOs);
View Full Code Here

         beanInfo = getBeanInfo(targetInterface);
         classInfo = beanInfo.getClassInfo();
      }
      HashMap<String, Annotation> moAnnotations = new HashMap<String, Annotation>();
      moAnnotations.put(ManagementObject.class.getName(), managementObject);
      ManagementDeployment mnagementDeployment = getAnnotation(ManagementDeployment.class, classInfo, metaData);
      if(mnagementDeployment != null)
         moAnnotations.put(ManagementDeployment.class.getName(), mnagementDeployment);
      ManagementObjectID moID = getAnnotation(ManagementObjectID.class, classInfo, metaData);
      if (moID != null)
         moAnnotations.put(ManagementObjectID.class.getName(), moID);
View Full Code Here

TOP

Related Classes of org.jboss.managed.api.annotation.ManagementDeployment

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.