Examples of disableAllTypes()


Examples of javax.management.NotificationFilterSupport.disableAllTypes()

  public void testDisableAllTypes()
  {
    NotificationFilterSupport nfs = new NotificationFilterSupport();
    nfs.enableType("type1");
    nfs.enableType("type2");
    nfs.disableAllTypes();
    assertEquals(false, nfs.isNotificationEnabled(n1));
    assertEquals(false, nfs.isNotificationEnabled(n2));
    assertEquals(false, nfs.isNotificationEnabled(n3));
    assertEquals(false, nfs.isNotificationEnabled(n4));
    assertEquals(false, nfs.isNotificationEnabled(n5));
View Full Code Here

Examples of javax.management.NotificationFilterSupport.disableAllTypes()

    assertEquals(false, v.contains("type1"));
    assertEquals(true, v.contains("type2"));

    // Remove all
    nfs.enableType("type2");
    nfs.disableAllTypes();
    v = nfs.getEnabledTypes();
    assertEquals(0, v.size());

    // Test duplication
    nfs.enableType("type1");
View Full Code Here

Examples of javax.management.NotificationFilterSupport.disableAllTypes()

            String cacheName = "rhq.cache:subsystem=alerts,service=cache";
            ObjectName mgmt_name = new ObjectName(cacheName);

            // configure a filter to only receive node created and removed events
            filter = new NotificationFilterSupport();
            filter.disableAllTypes();
            filter.enableType(CacheMgmtInterceptor.NOTIF_NODE_CREATED);
            filter.enableType(CacheMgmtInterceptor.NOTIF_NODE_REMOVED);
            filter.enableType(CacheMgmtInterceptor.NOTIF_NODE_MODIFIED);

            // register the listener with a filter
View Full Code Here

Examples of javax.management.NotificationFilterSupport.disableAllTypes()

  public void testDisableAllTypes()
  {
    NotificationFilterSupport nfs = new NotificationFilterSupport();
    nfs.enableType("type1");
    nfs.enableType("type2");
    nfs.disableAllTypes();
    assertEquals(false, nfs.isNotificationEnabled(n1));
    assertEquals(false, nfs.isNotificationEnabled(n2));
    assertEquals(false, nfs.isNotificationEnabled(n3));
    assertEquals(false, nfs.isNotificationEnabled(n4));
    assertEquals(false, nfs.isNotificationEnabled(n5));
View Full Code Here

Examples of javax.management.NotificationFilterSupport.disableAllTypes()

    assertEquals(false, v.contains("type1"));
    assertEquals(true, v.contains("type2"));

    // Remove all
    nfs.enableType("type2");
    nfs.disableAllTypes();
    v = nfs.getEnabledTypes();
    assertEquals(0, v.size());

    // Test duplication
    nfs.enableType("type1");
View Full Code Here

Examples of javax.management.NotificationFilterSupport.disableAllTypes()

  public void testDisableAllTypes()
  {
    NotificationFilterSupport nfs = new NotificationFilterSupport();
    nfs.enableType("type1");
    nfs.enableType("type2");
    nfs.disableAllTypes();
    assertEquals(false, nfs.isNotificationEnabled(n1));
    assertEquals(false, nfs.isNotificationEnabled(n2));
    assertEquals(false, nfs.isNotificationEnabled(n3));
    assertEquals(false, nfs.isNotificationEnabled(n4));
    assertEquals(false, nfs.isNotificationEnabled(n5));
View Full Code Here

Examples of javax.management.NotificationFilterSupport.disableAllTypes()

    assertEquals(false, v.contains("type1"));
    assertEquals(true, v.contains("type2"));

    // Remove all
    nfs.enableType("type2");
    nfs.disableAllTypes();
    v = nfs.getEnabledTypes();
    assertEquals(0, v.size());

    // Test duplication
    nfs.enableType("type1");
View Full Code Here

Examples of javax.management.NotificationFilterSupport.disableAllTypes()

                                       throws InstanceNotFoundException {
        NotificationFilterSupport filter = null;
        if (srvAlertRecipients == null) {
            //disable the event in filter
            filter = new NotificationFilterSupport();
            filter.disableAllTypes();
        }
        String subject = localStrings.getString("ruleMgr.alert_action",
                                                    ruleName, actionMBeanName);
        MailAlert alertAction = new MailAlert();
        alertAction.setSubject(subject);
View Full Code Here

Examples of javax.management.relation.MBeanServerNotificationFilter.disableAllTypes()

      try
      {
        final MBeanServerNotificationFilter  filter  =
          new MBeanServerNotificationFilter();
        filter.enableAllObjectNames();
        filter.disableAllTypes();
        filter.enableType( MBeanServerNotification.UNREGISTRATION_NOTIFICATION );
       
        JMXUtil.listenToMBeanServerDelegate( conn, this, filter, null );
      }
      catch( Exception e )
View Full Code Here

Examples of javax.management.relation.MBeanServerNotificationFilter.disableAllTypes()

      // but the http connector does not support listeners
      try
      {
        final MBeanServerNotificationFilter  filter  = new MBeanServerNotificationFilter();
        filter.enableAllObjectNames();
        filter.disableAllTypes();
        filter.enableType( MBeanServerNotification.UNREGISTRATION_NOTIFICATION );
        JMXUtil.listenToMBeanServerDelegate( conn, this, filter, null );
      }
      catch( Exception e )
      {
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.