Package org.jboss.managed.api.annotation

Examples of org.jboss.managed.api.annotation.ManagementComponent.type()


      // Create ManagedComponents for ManagedObjects annotated with ManagementComponent
      ManagementComponent mc = (ManagementComponent) moAnns.get(ManagementComponent.class.getName());
      if (mc != null && md.getComponent(mo.getName()) == null)
      {
         ComponentType type = new ComponentType(mc.type(), mc.subtype());
         ManagedComponentImpl comp = new TempManagedComponentImpl(type, md, mo);
         md.addComponent(mo.getName(), comp);
         log.debug("Processing ManagementComponent("+mo.getName()+"): "+comp);
         Set<ManagedComponent> typeComps = compByCompType.get(type);
         if (typeComps == null)
View Full Code Here


      ManagementObject managementObject = (ManagementObject) moAnns.get(ManagementObject.class.getName());
      if (managementObject != null && managementObject.isRuntime())
      {
         boolean merged = false;
         ManagementComponent mc = managementObject.componentType();
         boolean isMC = !(mc.type().length() == 0 && mc.subtype().length() == 0);

         // Merge this with the ManagedObject
         ManagedObject parentMO = moRegistry.get(key);
         if (parentMO == null && isMC == false)
         {
View Full Code Here

      ManagementObject managementObject = (ManagementObject) moAnns.get(ManagementObject.class.getName());
      if (managementObject.isRuntime())
      {
         boolean merged = false;
         ManagementComponent mc = managementObject.componentType();
         boolean isMC = !(mc.type().length() == 0 && mc.subtype().length() == 0);
        
         // Merge this with the ManagedObject
         ManagedObject parentMO = moRegistry.get(key);
         if (parentMO == null && isMC == false)
         {
View Full Code Here

      // Create ManagedComponents for ManagedObjects annotated with ManagementComponent
      ManagementComponent mc = (ManagementComponent) moAnns.get(ManagementComponent.class.getName());
      if (mc != null && md.getComponent(mo.getName()) == null)
      {
         ComponentType type = new ComponentType(mc.type(), mc.subtype());
         ManagedComponentImpl comp = new ManagedComponentImpl(type, md, mo);
         md.addComponent(mo.getName(), comp);
         log.debug("Processing ManagementComponent("+mo.getName()+"): "+comp);
         Set<ManagedComponent> typeComps = compByCompType.get(type);
         if (typeComps == null)
View Full Code Here

            mc = metaData.getAnnotation(ManagementComponent.class);
         if (mc == null)
            mc = managementObject.componentType();
         // Work around JBMDR-51 by checking type/subtype
         // if (mc.equals(AnnotationDefaults.COMP_TYPE) == false)
         if (mc.type().length() > 0 || mc.subtype().length() > 0)
         {
            log.debug("ManagedObject("+name+") is ManagedComponent type: "+mc);
            moAnnotations.put(ManagementComponent.class.getName(), mc);
         }
         // ManagementObject level default factory classes
View Full Code Here

   {
      Map<String, Annotation> moAnns = mo.getAnnotations();
      assertNotNull(moAnns);
      ManagementComponent mc = (ManagementComponent) moAnns.get(ManagementComponent.class.getName());
      assertNotNull(mc);
      assertEquals("MBean", mc.type());
      assertEquals("Platform", mc.subtype());     
   }

   static class X
   {
View Full Code Here

            mc = metaData.getAnnotation(ManagementComponent.class);
         if (mc == null)
            mc = managementObject.componentType();
         // Work around JBMDR-51 by checking type/subtype
         // if (mc.equals(AnnotationDefaults.COMP_TYPE) == false)
         if (mc.type().length() > 0 || mc.subtype().length() > 0)
         {
            log.debug("ManagedObject("+name+") is ManagedComponent type: "+mc);
            moAnnotations.put(ManagementComponent.class.getName(), mc);
         }
         // ManagementObject level default factory classes
View Full Code Here

      assertEquals("testMetaDataRepositoryOverride", managedObject.getName());
      Map<String, Annotation> moAnnotations = managedObject.getAnnotations();
      assertEquals("MO annotations == 2;", 2, moAnnotations.size());
      ManagementObject moAnn = (ManagementObject) moAnnotations.get(ManagementObject.class.getName());
      ManagementComponent componentType = moAnn.componentType();
      assertEquals("componentType.type", "MCBean", componentType.type());
      assertEquals("componentType.subtype", "MetaDataTest", componentType.subtype());
      checkPropertyDefaults(managedObject, "bigDecimalValue", BigDecimal.class, bigDecimal);
      checkDefaultManagedProperties(managedObject, SimpleUnannotated.class);
   }
View Full Code Here

      // Create ManagedComponents for
      ManagementComponent mc = (ManagementComponent) moAnns.get(ManagementComponent.class.getName());
      if (mc != null)
      {
         ComponentType type = new ComponentType(mc.type(), mc.subtype());
         ManagedComponentImpl comp = new ManagedComponentImpl(type, md, mo);
         md.addComponent(mo.getName(), comp);
      }

      // Scan for @ManagementObjectRef
View Full Code Here

               ComponentType type = KnownComponentTypes.MCBean.Any.getType();
               Map<String, Annotation> moAnns = bmdMO.getAnnotations();
               ManagementComponent mc = (ManagementComponent) moAnns.get(ManagementComponent.class.getName());
               if(mc != null)
               {
                  type = new ComponentType(mc.type(), mc.subtype());
               }
               ManagedComponentImpl comp = new ManagedComponentImpl(type, md, bmdMO);
               md.addComponent(bmdMO.getName(), comp);
               log.debug("Created ManagedComponent("+comp.getName()+") of type: "
                     +type
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.