Examples of ManagedObjectImpl


Examples of org.jboss.managed.plugins.ManagedObjectImpl

         throw new IllegalArgumentException("Null managed object");
     
      if (managedObject instanceof ManagedObjectImpl == false)
         throw new IllegalStateException("Unable to create object " + managedObject.getClass().getName());
     
      ManagedObjectImpl managedObjectImpl = (ManagedObjectImpl) managedObject;
      Serializable object = createUnderlyingObject(managedObjectImpl, clazz);
      populateManagedObject(managedObject, object);
   }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedObjectImpl

   public void populateManagedObject(ManagedObject managedObject, Serializable object)
   {
      if (managedObject instanceof ManagedObjectImpl == false)
         throw new IllegalStateException("Unable to populate managed object " + managedObject.getClass().getName());
     
      ManagedObjectImpl managedObjectImpl = (ManagedObjectImpl) managedObject;
      managedObjectImpl.setAttachment(object);
      populateValues(managedObjectImpl, object);
   }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedObjectImpl

   {
      super(name, description);
      this.destinationType = destinationType;
      super.setRootManagedPropertyName("services");

      ManagedObjectImpl mo;
      if("queue".equals(destinationType))
         mo = new ManagedObjectImpl("org.jboss.jms.server.destination.QueueServiceMO");
      else if("topic".equals(destinationType))
         mo = new ManagedObjectImpl("org.jboss.jms.server.destination.TopicServiceMO");
      else
         throw new IllegalStateException("Unexpected destination type: " + destinationType);

      addManagedProperty("name", "The destination name", true, false, SimpleMetaType.STRING, mo);
      addManagedProperty("JNDIName", "The destination's JNDI name", false, true, SimpleMetaType.STRING, mo);
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedObjectImpl

      String nameType = null;
      String attachmentName = "testDeprecatedCtor.attachment";
      Set<ManagedProperty> props = null;
      HashSet<ManagedOperation> ops = null;
      Serializable attachment = null;
      ManagedObjectImpl mo = new ManagedObjectImpl(name, nameType, attachmentName, props, ops, attachment);
     
      Set<ManagedOperation> ops2 = ops;
      Object attachment2 = attachment;
      ManagedObjectImpl mo2 = new ManagedObjectImpl(name, nameType, attachmentName, props, ops2, attachment2);
   }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedObjectImpl

            ManagedOperation op = getManagedOperation(methodInfo, managementOp, metaData);
            operations.add(op);
         }
      }

      ManagedObjectImpl result = new ManagedObjectImpl(name, properties);
      result.setAnnotations(moAnnotations);
      // Set the component name to name if this is a runtime MO with a name specified
      if (isRuntime && hasDefaultName == false)
         result.setComponentName(name);
      if (nameType != null)
         result.setNameType(nameType);
      if (attachmentName != null)
         result.setAttachmentName(attachmentName);
      if (operations.size() > 0 )
         result.setOperations(operations);
      for (ManagedProperty property : properties)
         property.setManagedObject(result);
      result.setTransientAttachment(BeanInfo.class.getName(), beanInfo);
      // Propagate whether the name is defaulted
      result.setTransientAttachment("ManagedObject.hasDefaultName", hasDefaultName);
      return result;
   }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedObjectImpl

      if (runtimeProps != null)
         props.putAll(runtimeProps);
      if (runtimeOps != null)
         ops.addAll(runtimeOps);

      ManagedObjectImpl moi = (ManagedObjectImpl) mo;
      moi.setProperties(props);
      moi.setOperations(ops);
   }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedObjectImpl

   {
      TestAttachment attachment = unit.getAttachment(TestAttachment.class);
      if (attachment != null)
      {
         attachment = attachment.clone();
         ManagedObjectImpl managedObject = new ManagedObjectImpl(TestAttachment.class.getName());
         managedObject.setAttachment(attachment);
         Map<String, ManagedProperty> properties = managedObject.getProperties();
         properties.put("string1", new ManagedPropertyImpl(managedObject, new TestFields(attachment, "string1")));
         properties.put("string2", new ManagedPropertyImpl(managedObject, new TestFields(attachment, "string2")));
         managedObjects.put(TestAttachment.class.getName(), managedObject);
      }
   }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedObjectImpl

   }

   protected ManagedObject createFactoryManagedObject(BeanMetaDataFactory bmdf,
         ManagedObject parent, MetaData metaData)
   {
      ManagedObjectImpl bmdfMO = new ManagedObjectImpl(bmdf.getClass().getName());
      Map<String, ManagedProperty> newProps = new HashMap<String, ManagedProperty>();
      bmdfMO.setParent(parent);
      bmdfMO.setProperties(newProps);
      return bmdfMO;
   }
View Full Code Here

Examples of org.jboss.managed.plugins.ManagedObjectImpl

             * as this will create ManagedObjects for the beans via the beansFactory
             * property. We handle the beans below.
            */
            Set<ManagedProperty> kdProperties = new HashSet<ManagedProperty>();
            HashSet<ManagedOperation> ops = null;
            ManagedObject kdMO = new ManagedObjectImpl(kd.getName(), "",
                  KernelDeployment.class.getName(),
                  kdProperties, ops, (Serializable) kd);
            Map<String, ManagedObject> kdMOs = new HashMap<String, ManagedObject>();
            kdMOs.put(kd.getName(), kdMO);

View Full Code Here

Examples of org.jboss.managed.plugins.ManagedObjectImpl

            ManagedOperation op = getManagedOperation(methodInfo, managementOp);
            operations.add(op);
         }
      }

      ManagedObjectImpl result = new ManagedObjectImpl(name, properties);
      result.setAnnotations(moAnnotations);
      if (nameType != null)
         result.setNameType(nameType);
      if (attachmentName != null)
         result.setAttachmentName(attachmentName);
      if (operations.size() > 0 )
         result.setOperations(operations);
      for (ManagedProperty property : properties)
         property.setManagedObject(result);
      return result;
   }
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.