Examples of enableAttribute()


Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

      if (listener == null) throw new IllegalArgumentException("Listener cannot be null");
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
      if (attributeName != null)
      {
         if (m_modelMBeanInfo.getAttribute(attributeName) == null) throw new RuntimeOperationsException(new IllegalArgumentException("No attribute named " + attributeName));
         filter.enableAttribute(attributeName);
      }
      else
      {
         MBeanAttributeInfo[] ai = m_modelMBeanInfo.getAttributes();
         for (int i = 0; i < ai.length; i++)
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

      {
         MBeanAttributeInfo[] ai = m_modelMBeanInfo.getAttributes();
         for (int i = 0; i < ai.length; i++)
         {
            Descriptor d = ((ModelMBeanAttributeInfo)ai[i]).getDescriptor();
            filter.enableAttribute((String)d.getFieldValue("name"));
         }
      }

      getAttributeChangeBroadcaster().addNotificationListener(listener, filter, handback);
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

      if (listener == null) throw new ListenerNotFoundException("listener is null");
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
      if (attributeName != null)
      {
         if (m_modelMBeanInfo.getAttribute(attributeName) == null) throw new RuntimeOperationsException(new IllegalArgumentException("No attribute named " + attributeName));
         filter.enableAttribute(attributeName);
      }
      else
      {
         MBeanAttributeInfo[] ai = m_modelMBeanInfo.getAttributes();
         for (int i = 0; i < ai.length; i++)
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

      {
         MBeanAttributeInfo[] ai = m_modelMBeanInfo.getAttributes();
         for (int i = 0; i < ai.length; i++)
         {
            Descriptor d = ((ModelMBeanAttributeInfo)ai[i]).getDescriptor();
            filter.enableAttribute((String)d.getFieldValue("name"));
         }
      }

      getAttributeChangeBroadcaster().removeNotificationListener(listener, filter, handback);
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

   }

   public AttributeChangeNotificationFilter createAttributeChangeNotificationFilter()
   {
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
      filter.enableAttribute("attribute-name");
      return filter;
   }

   public AttributeList createAttributeList()
   {
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

        MBeanAttributeInfo[] attrInfo = modelMBeanInfo.getAttributes();
        boolean found = false;
        if (inAttributeName == null) {
            if ((attrInfo != null) && (attrInfo.length>0)) {
                for (int i=0; i<attrInfo.length; i++) {
                    currFilter.enableAttribute(attrInfo[i].getName());
                }
            }
        } else {
            if ((attrInfo != null) && (attrInfo.length>0)) {
                for (int i=0; i<attrInfo.length; i++) {
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

        } else {
            if ((attrInfo != null) && (attrInfo.length>0)) {
                for (int i=0; i<attrInfo.length; i++) {
                    if (inAttributeName.equals(attrInfo[i].getName())) {
                        found = true;
                        currFilter.enableAttribute(inAttributeName);
                        break;
                    }
                }
            }
            if (!found) {
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

  {
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
     
      assertTrue(filter.getEnabledAttributes().size() == 0);
     
      filter.enableAttribute("foo");
      filter.enableAttribute("bar");
     
      assertTrue(filter.getEnabledAttributes().size() == 2);
  }
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
     
      assertTrue(filter.getEnabledAttributes().size() == 0);
     
      filter.enableAttribute("foo");
      filter.enableAttribute("bar");
     
      assertTrue(filter.getEnabledAttributes().size() == 2);
  }

  public void testDisableAttribute()
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

  public void testDisableAttribute()
  {
     AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
    
     filter.enableAttribute("foo");
     filter.enableAttribute("bar");
    
     assertTrue(filter.getEnabledAttributes().size() == 2);
    
     filter.disableAttribute("foo");
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.