Examples of addNotificationListener()


Examples of com.sun.appserv.management.base.NotificationEmitterService.addNotificationListener()

   
    final NotificationBuilder  builder  =
      new NotificationBuilder( testEmitListener.TEST_TYPE, TEST_SOURCE );
   
    final testEmitListener  listener  = new testEmitListener();
    nes.addNotificationListener( listener, null, null);
    final Notification  notif  = builder.buildNew( TEST_MESSAGE);
    builder.putMapData( notif, TEST_KEY, TEST_VALUE );
   
    // call emitNotification() and verify it was emitted
    nes.emitNotification( notif );
View Full Code Here

Examples of com.sun.appserv.management.base.NotificationService.addNotificationListener()

    proxy.listenTo( objectName, null );
    assert( proxy.getListeneeSet().size() == 1 );
    assert( Util.getObjectName( (Util.asAMX(proxy.getListeneeSet().iterator().next())) ).equals( objectName ) );
   
    final MyListener  myListener  = new MyListener();
    proxy.addNotificationListener( myListener, null, null );
    
    final Level  saveLevel = queryMgr.getMBeanLogLevel();
    queryMgr.setMBeanLogLevel( Level.INFO );
    queryMgr.setMBeanLogLevel( saveLevel );
   
View Full Code Here

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

    final Object  deployID  = mgr.initDeploy( );
    assert( deployID instanceof String );
    final MyNotificationListener myListener  = new MyNotificationListener( deployID);
   
    DeploymentStatus  status  = null;
    mgr.addNotificationListener( myListener, null, null );
    try
    {
      final Map<String,String> options  = new HashMap<String,String>();
      options.put( DeploymentMgr.DEPLOY_OPTION_FORCE_KEY, Boolean.TRUE.toString() );
      options.put( DeploymentMgr.DEPLOY_OPTION_VERIFY_KEY, Boolean.TRUE.toString() );
View Full Code Here

Examples of com.sun.jdmk.remote.cascading.CascadingAgent.addNotificationListener()

      null);

      // add notification listener
      CascadingConnectionNotifListener ccnl =
    new CascadingConnectionNotifListener(serverName);
            cascadingAgent.addNotificationListener(ccnl, null, null);

      // register with mBean server
      ObjectInstance cascadingAgentInstance =
    mbs.registerMBean(cascadingAgent, cascadingAgentName);
           
View Full Code Here

Examples of com.sun.mfwk.agent.appserv.lifecycle.ListenerManager.addNotificationListener()

       
        // register dynamic config listener
        ListenerManager listenerManager = ListenerManagerFactory.getListenerManager();
        try {
            ListenerImpl listener = new ListenerImpl(_serverName, _domainName);
            listenerManager.addNotificationListener(_serverName, _domainName,
                    listener, null, null);
        } catch(Exception ex) {
             Utils.log(Level.SEVERE, "Error while registering dynamic config listener", ex);
        }
       
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

 
  public JBossLifeCycleListener() {
    try {
      MBeanServer server = MBeanServerFactory.findMBeanServer(null).get(0);
      ObjectName on = new ObjectName("jboss.system:type=Server"); //$NON-NLS-1$
      server.addNotificationListener(on, this, null, null);
    } catch (MalformedObjectNameException e) {
      //ignore
    } catch (InstanceNotFoundException e) {
      //ignore
    }
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

            ObjectName executorName = ((ObjectInstance) it.next()).getObjectName();
            executorNames.add(executorName);
        }

        // Register with MBean server
        server.addNotificationListener(new ObjectName("JMImplementation:type=MBeanServerDelegate"), this, null, null);

    }

    public synchronized List getThreadPools() throws Exception {
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

      else
      {
         // Register for notification of the overall server startup
         log.debug("Server '" + ServerImplMBean.OBJECT_NAME + "' not started, registering for start-up notification");

         server.addNotificationListener(ServerImplMBean.OBJECT_NAME, this, null, null);
      }

   }

   /**
 
View Full Code Here

Examples of javax.management.MBeanServer.addNotificationListener()

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

Examples of javax.management.MBeanServer.addNotificationListener()

        ObjectName delegate=new ObjectName("JMImplementation:type=MBeanServerDelegate");

        // XXX need to extract info about previously loaded beans

        // we'll know of all registered beans
        mserver.addNotificationListener(delegate, this, null, null );

    }

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