Package org.jboss.managed.api.annotation

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


            if ("class".equals(propertyInfo.getName()))
               continue;

            ManagementProperty managementProperty = propertyInfo.getUnderlyingAnnotation(ManagementProperty.class);
            ManagementObjectID id = propertyInfo.getUnderlyingAnnotation(ManagementObjectID.class);
            ManagementObjectRef ref = propertyInfo.getUnderlyingAnnotation(ManagementObjectRef.class);
            ManagementRuntimeRef runtimeRef = propertyInfo.getUnderlyingAnnotation(ManagementRuntimeRef.class);
            HashMap<String, Annotation> propAnnotations = new HashMap<String, Annotation>();
            if (managementProperty != null)
               propAnnotations.put(ManagementProperty.class.getName(), managementProperty);
            if (id != null)
View Full Code Here


      if (MANAGED_OBJECT_META_TYPE == propertyType)
      {
         if (value instanceof Serializable == false)
            throw new IllegalStateException("Object is not serializable: " + value.getClass().getName());
         // Look for a ManagementObjectRef
         ManagementObjectRef ref = (ManagementObjectRef) property.getAnnotations().get(ManagementObjectRef.class.getName());
         String moName = (ref != null ? ref.name() : value.getClass().getName());
         String moNameType = (ref != null ? ref.type() : "");
         ManagedObject mo = initManagedObject((Serializable) value, moName, moNameType);
         return new GenericValueSupport(MANAGED_OBJECT_META_TYPE, mo);
      }
      else if (propertyType.isArray())
      {
View Full Code Here

            if ("class".equals(propertyInfo.getName()))
               continue;

            ManagementProperty managementProperty = propertyInfo.getUnderlyingAnnotation(ManagementProperty.class);
            ManagementObjectID id = propertyInfo.getUnderlyingAnnotation(ManagementObjectID.class);
            ManagementObjectRef ref = propertyInfo.getUnderlyingAnnotation(ManagementObjectRef.class);
            ManagementRuntimeRef runtimeRef = propertyInfo.getUnderlyingAnnotation(ManagementRuntimeRef.class);
            HashMap<String, Annotation> propAnnotations = new HashMap<String, Annotation>();
            if (managementProperty != null)
               propAnnotations.put(ManagementProperty.class.getName(), managementProperty);
            if (id != null)
View Full Code Here

      if (MANAGED_OBJECT_META_TYPE == propertyType)
      {
         if (value instanceof Serializable == false)
            throw new IllegalStateException("Object is not serializable: " + value.getClass().getName());
         // Look for a ManagementObjectRef
         ManagementObjectRef ref = (ManagementObjectRef) property.getAnnotations().get(ManagementObjectRef.class.getName());
         String moName = (ref != null ? ref.name() : value.getClass().getName());
         String moNameType = (ref != null ? ref.type() : "");
         ManagedObject mo = initManagedObject((Serializable) value, moName, moNameType);
         return new GenericValueSupport(MANAGED_OBJECT_META_TYPE, mo);
      }
      else if (propertyType.isArray())
      {
View Full Code Here

            if ("class".equals(propertyInfo.getName()))
               continue;

            ManagementProperty managementProperty = getAnnotation(ManagementProperty.class, propertyInfo, metaData);
            ManagementObjectID id = getAnnotation(ManagementObjectID.class, propertyInfo, metaData);
            ManagementObjectRef ref = getAnnotation(ManagementObjectRef.class, propertyInfo, metaData);
            ManagementRuntimeRef runtimeRef = getAnnotation(ManagementRuntimeRef.class, propertyInfo, metaData);
            RunStateProperty rsp = getAnnotation(RunStateProperty.class, propertyInfo, metaData);
            Masked masked = getAnnotation(Masked.class, propertyInfo, metaData);
            DefaultValueBuilderFactory defaultsFactory = getAnnotation(DefaultValueBuilderFactory.class, propertyInfo, metaData);
            HashMap<String, Annotation> propAnnotations = new HashMap<String, Annotation>();
View Full Code Here

            moRegistry.put(propKey, mo);
            checkForReferences(propKey, mo);
         }

         // See if this is a ManagementObjectRef
         ManagementObjectRef ref = (ManagementObjectRef) prop.getAnnotations().get(ManagementObjectRef.class.getName());
         if ( ref != null )
         {
            // The reference key is the prop value + ref.type()
            log.debug("Property("+prop.getName()+") references: "+ref);
            Object refName = getRefName(prop.getValue());
            if (refName == null)
               refName = ref.name();
            String targetKey = refName + "/" + ref.type();
            ManagedObject target = moRegistry.get(targetKey);
            if (target != null)
            {
               log.debug("Resolved property("+prop.getName()+") reference to: "+targetKey);
               prop.setTargetManagedObject(target);
View Full Code Here

      if (AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE == propertyType)
      {
         if (value instanceof Serializable == false)
            throw new IllegalStateException("Object is not serializable: " + value.getClass().getName());
         // Look for a ManagementObjectRef
         ManagementObjectRef ref = (ManagementObjectRef) property.getAnnotations().get(ManagementObjectRef.class.getName());
         String moName = (ref != null ? ref.name() : value.getClass().getName());
         String moNameType = (ref != null ? ref.type() : "");
         ManagedObject mo = mof.initManagedObject((Serializable) value, moName, moNameType);
         return new GenericValueSupport(AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE, mo);
      }
      else if (propertyType.isArray())
      {
View Full Code Here

            if ("class".equals(propertyInfo.getName()))
               continue;

            ManagementProperty managementProperty = propertyInfo.getUnderlyingAnnotation(ManagementProperty.class);
            ManagementObjectID id = propertyInfo.getUnderlyingAnnotation(ManagementObjectID.class);
            ManagementObjectRef ref = propertyInfo.getUnderlyingAnnotation(ManagementObjectRef.class);
            ManagementRuntimeRef runtimeRef = propertyInfo.getUnderlyingAnnotation(ManagementRuntimeRef.class);
            HashMap<String, Annotation> propAnnotations = new HashMap<String, Annotation>();
            if (managementProperty != null)
               propAnnotations.put(ManagementProperty.class.getName(), managementProperty);
            if (id != null)
View Full Code Here

      if (MANAGED_OBJECT_META_TYPE == propertyType)
      {
         if (value instanceof Serializable == false)
            throw new IllegalStateException("Object is not serializable: " + value.getClass().getName());
         // Look for a ManagementObjectRef
         ManagementObjectRef ref = (ManagementObjectRef) property.getAnnotations().get(ManagementObjectRef.class.getName());
         String moName = (ref != null ? ref.name() : value.getClass().getName());
         String moNameType = (ref != null ? ref.type() : "");
         ManagedObject mo = initManagedObject((Serializable) value, moName, moNameType);
         return new GenericValueSupport(MANAGED_OBJECT_META_TYPE, mo);
      }
      else if (propertyType.isArray())
      {
View Full Code Here

/* 294 */           log.debug("ManagedProperty level ID for ManagedObject: " + propKey + ", attachmentName: " + mo.getAttachmentName());
/* 295 */           this.moRegistry.put(propKey, mo);
/* 296 */           checkForReferences(propKey, mo);
/*     */         }
/*     */
/* 299 */         ManagementObjectRef ref = (ManagementObjectRef)pannotations.get(ManagementObjectRef.class.getName());
/* 300 */         if (ref != null)
/*     */         {
/* 303 */           log.debug("Property(" + prop.getName() + ") references: " + ref);
/* 304 */           Object refName = getRefName(prop.getValue());
/* 305 */           if (refName == null)
/* 306 */             refName = ref.name();
/* 307 */           String targetKey = refName + "/" + ref.type();
/* 308 */           ManagedObject target = (ManagedObject)this.moRegistry.get(targetKey);
/* 309 */           if (target != null)
/*     */           {
/* 311 */             log.debug("Resolved property(" + prop.getName() + ") reference to: " + targetKey);
/* 312 */             prop.setTargetManagedObject(target);
View Full Code Here

TOP

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

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.