Examples of enableAttribute()


Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

      ejbModuleName = ejbModule.getServiceName().toString();

      // we register our inner-class to retrieve STATE notifications from our container
      //
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter ();
      filter.enableAttribute ("State");

      this.container.getServer ().
         addNotificationListener (this.container.getEjbModule ().getServiceName (),
                                  new CleanShutdownInterceptor.StateChangeListener (),
                                  filter,
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

   {
      super.createService();
     
      // we register our inner-class to retrieve STATE notifications from our container
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
      filter.enableAttribute("State");
      listener = new StateChangeListener();
      getServer().addNotificationListener(getTargetName(), listener, filter, null);
   }
  
   protected void startService() throws Exception
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

      super.create ();
     
      // we register our inner-class to retrieve STATE notifications from our container
      //
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter ();
      filter.enableAttribute ("State");
     
      // ************************************************************************
      // NOTE: We could also subscribe for the container service events instead of the
      // ejbModule service events. This problem comes from beans using other beans
      // in the same ejbModule: we may receive an IllegalStateException thrown
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

         NotificationListener listener,
         String attributeName,
         Object handback) throws MBeanException
   {
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
      filter.enableAttribute(attributeName);
      notifier.addNotificationListener(listener, filter, handback);
   }

   /**
   * @deprecated use {@link #removeNotificationListener} instead
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

     * @throws IllegalArgumentException
     */
    public void addAttributeChangeNotificationListener(NotificationListener l, String attrName, Object handback)
            throws MBeanException, RuntimeOperationsException, IllegalArgumentException {
        AttributeChangeNotificationFilter currFilter = new AttributeChangeNotificationFilter();
        currFilter.enableAttribute(attrName);
        broadcasterSupport.addNotificationListener(l, currFilter, handback);
    }

    /**
     * @param l
View Full Code Here

Examples of javax.management.AttributeChangeNotificationFilter.enableAttribute()

   protected boolean registered = false;

   protected void startObserving() throws Exception
   {
      AttributeChangeNotificationFilter filter = new AttributeChangeNotificationFilter();
      filter.enableAttribute(observedAttribute);
      server.addNotificationListener(observedName, this, filter, null);
      registered = true;
   }

   protected void stopObserving() throws Exception
View Full Code Here

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
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.