Examples of removeNotificationListener()


Examples of com.sun.appserv.management.deploy.DeploymentMgr.removeNotificationListener()

    }
    finally
    {
      try
      {
        mgr.removeNotificationListener( myListener );
      }
      catch( Exception e )
      {
      }
    }
View Full Code Here

Examples of javax.management.MBeanServer.removeNotificationListener()

      {
         MBeanServer server = this.getMBeanServer();
        
         if (server.isRegistered(TomcatDeployer.TOMCAT_SERVICE_NAME))
         {
            server.removeNotificationListener(TomcatDeployer.TOMCAT_SERVICE_NAME, this);
         }
      }
      catch (Exception e)
      {
         throw new LifecycleException(e);
View Full Code Here

Examples of javax.management.MBeanServer.removeNotificationListener()

        } catch (Exception e) {
            throw new OperationFailedException(e.getMessage(), e, new ModelNode().set(e.getMessage()));
        } finally {
            if (listener != null) {
                try {
                    server.removeNotificationListener(beanName, listener);
                    listener.done();
                } catch (Exception e) {
                }
            }
        }
View Full Code Here

Examples of javax.management.MBeanServer.removeNotificationListener()

      );      
      server.addNotificationListener(
            new ObjectName("JMImplementation:type=MBeanServerDelegate"),
            listener2, null, "handback3"
      );      
      server.removeNotificationListener(
            new ObjectName("JMImplementation:type=MBeanServerDelegate"),
            listener2
      );      
   
      // force notification
View Full Code Here

Examples of javax.management.MBeanServer.removeNotificationListener()

      );      
      server.addNotificationListener(
            new ObjectName("JMImplementation:type=MBeanServerDelegate"),
            listener2, null, "handback3"
      );      
      server.removeNotificationListener(
            new ObjectName("JMImplementation:type=MBeanServerDelegate"),
            listener2, null, "handback3"
      );      
   
      // force notification
View Full Code Here

Examples of javax.management.MBeanServer.removeNotificationListener()

            new ObjectName("JMImplementation:type=MBeanServerDelegate"),
            listener, null, null
      );

      // Remove ourselves from the broadcaster
      server.removeNotificationListener(broadcasterName, listener);      

      // Test we get a notification from the broadcaster
      broadcaster.doSomething();
      assertEquals(0, listener.result);
View Full Code Here

Examples of javax.management.MBeanServer.removeNotificationListener()

      ObjectName delegateName =
         new ObjectName("JMImplementation:type=MBeanServerDelegate");
      server.addNotificationListener(delegateName, listenerName1, null, "handback1");
      server.addNotificationListener(delegateName, listenerName2, null, "handback2");
      server.addNotificationListener(delegateName, listenerName2, null, "handback3");
      server.removeNotificationListener(delegateName, listenerName2);
   
      // force notification
      server.registerMBean(new Test(), new ObjectName(":foo=bar"));
      assertTrue("Listener1 should get a notification", listener1.count == 1);
      assertTrue("Source should be the delegate", listener1.source.equals(delegateName));
View Full Code Here

Examples of javax.management.MBeanServer.removeNotificationListener()

      ObjectName delegateName =
         new ObjectName("JMImplementation:type=MBeanServerDelegate");
      server.addNotificationListener(delegateName, listenerName1, null, "handback1");
      server.addNotificationListener(delegateName, listenerName2, null, "handback2");
      server.addNotificationListener(delegateName, listenerName2, null, "handback3");
      server.removeNotificationListener(delegateName, listenerName2, null, "handback3");
   
      // force notification
      server.registerMBean(new Test(), new ObjectName(":foo=bar"));
      assertTrue("Listener1 should get a notification", listener1.count == 1);
      assertTrue("Source should be the delegate", listener1.source.equals(delegateName));
View Full Code Here

Examples of javax.management.MBeanServer.removeNotificationListener()

      ObjectName broadcasterName = new ObjectName("test:type=Broadcaster");
      server.registerMBean(new Broadcaster(), broadcasterName);
     
      server.addNotificationListener(broadcasterName, listenerName, null, "handback1");
      server.removeNotificationListener(broadcasterName, listenerName, null, "handback1");
      server.unregisterMBean(broadcasterName);

      Broadcaster broadcaster = new Broadcaster();
      server.registerMBean(broadcaster, broadcasterName);
      server.addNotificationListener(broadcasterName, listenerName, null, "handback2");
View Full Code Here

Examples of javax.management.MBeanServer.removeNotificationListener()

      ObjectName delegateName =
         new ObjectName("JMImplementation:type=MBeanServerDelegate");
      server.addNotificationListener(delegateName,listenerName1, null, null);      

      // Remove ourselves from the broadcaster
      server.removeNotificationListener(broadcasterName, listener1);      

      // Test we get a notification from the broadcaster
      broadcaster.doSomething();
      assertEquals(0, listener1.count);
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.