Package javax.management

Examples of javax.management.AttributeList


            throw new RuntimeOperationsException
                (new IllegalArgumentException("Attributes list is null"),
                 "Attributes list is null");

        // Prepare and return our response, eating all exceptions
        AttributeList response = new AttributeList();
        String names[] = new String[attributes.size()];
        int n = 0;
        Iterator items = attributes.iterator();
        while (items.hasNext()) {
            Attribute item = (Attribute) items.next();
View Full Code Here


        final ResourceAndRegistration reg = getRootResourceAndRegistration();
        final PathAddress address = ObjectNameAddressUtil.resolvePathAddress(reg.getResource(), name);
        if (address == null) {
            throw createInstanceNotFoundException(name);
        }
        AttributeList list = new AttributeList();
        for (String attribute : attributes) {
            try {
                list.add(new Attribute(attribute, getAttribute(reg, address, name, attribute)));
            } catch (AttributeNotFoundException e) {
                throw new ReflectionException(e);
            }
        }
        return list;
View Full Code Here

      setNamedAttribute(attribute);
   }

   public synchronized AttributeList getAttributes(String[] names) {
      AttributeList al = new AttributeList();
      for (String name : names) {
         Attribute attr = getNamedAttribute(name);
         if (attr != null) {
            al.add(attr);
         } else {
            log.warn("Did not find attribute " + name);
         }
      }
      return al;
View Full Code Here

      }
      return al;
   }

   public synchronized AttributeList setAttributes(AttributeList list) {
      AttributeList results = new AttributeList();
      for (int i = 0; i < list.size(); i++) {
         Attribute attr = (Attribute) list.get(i);

         if (setNamedAttribute(attr)) {
            results.add(attr);
         } else {
            if (log.isWarnEnabled()) {
               log.warn("Failed to update attribute name " + attr.getName() + " with value "
                        + attr.getValue());
            }
View Full Code Here

      setNamedAttribute(attribute);
   }

   public synchronized AttributeList getAttributes(String[] names) {
      AttributeList al = new AttributeList();
      for (String name : names) {
         Attribute attr = getNamedAttribute(name);
         if (attr != null) {
            al.add(attr);
         } else {
            log.warn("Did not find attribute " + name);
         }
      }
      return al;
View Full Code Here

      }
      return al;
   }

   public synchronized AttributeList setAttributes(AttributeList list) {
      AttributeList results = new AttributeList();
      for (Object aList : list) {
         Attribute attr = (Attribute) aList;

         if (setNamedAttribute(attr)) {
            results.add(attr);
         } else {
            if (log.isWarnEnabled()) {
               log.warn("Failed to update attribute name " + attr.getName() + " with value "
                       + attr.getValue());
            }
View Full Code Here

      setNamedAttribute(attribute);
   }

   public synchronized AttributeList getAttributes(String[] names)
   {
      AttributeList al = new AttributeList();
      for (String name : names)
      {
         Attribute attr = getNamedAttribute(name);
         if (attr != null)
         {
            al.add(attr);
         }
         else
         {
            log.warn("Did not find attribute " + name);
         }
View Full Code Here

      return al;
   }

   public synchronized AttributeList setAttributes(AttributeList list)
   {
      AttributeList results = new AttributeList();
      for (int i = 0; i < list.size(); i++)
      {
         Attribute attr = (Attribute) list.get(i);

         if (log.isDebugEnabled())
         {
            log.debug("Attribute name " + attr.getName() + " new value is " + attr.getValue());
         }

         if (setNamedAttribute(attr))
         {
            results.add(attr);
         }
         else
         {
            if (log.isWarnEnabled())
            {
View Full Code Here

      setNamedAttribute(attribute);
   }

   @Override
   public synchronized AttributeList getAttributes(String[] names) {
      AttributeList al = new AttributeList();
      for (String name : names) {
         Attribute attr = getNamedAttribute(name);
         if (attr != null) {
            al.add(attr);
         } else {
            log.couldNotFindAttribute(name);
         }
      }
      return al;
View Full Code Here

      return al;
   }

   @Override
   public synchronized AttributeList setAttributes(AttributeList list) {
      AttributeList results = new AttributeList();
      for (Object aList : list) {
         Attribute attr = (Attribute) aList;

         if (setNamedAttribute(attr)) {
            results.add(attr);
         } else {
            log.failedToUpdateAtribute(attr.getName(), attr.getValue());
         }
      }
      return results;
View Full Code Here

TOP

Related Classes of javax.management.AttributeList

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.