Package org.jwatch.domain.instance

Examples of org.jwatch.domain.instance.QuartzInstance


   {
      try
      {
         QuartzConfig config = new QuartzConfig(Tools.generateUUID(), "localhost", 2911, null, null);
         QuartzConnectService quartzConnectService = new QuartzConnectServiceImpl();
         QuartzInstance quartzInstance = quartzConnectService.initInstance(config);
         if (quartzInstance != null)
         {
            List shList = quartzInstance.getSchedulerList();
            if (shList != null && shList.size() > 0)
            {
               for (int i = 0; i < shList.size(); i++)
               {
                  Scheduler scheduler = (Scheduler) shList.get(i);

                  QuartzConnectUtil.printMBeanProperties(quartzInstance, scheduler.getObjectName());

                  MBeanServerConnection connection = quartzInstance.getMBeanServerConnection();
                  ObjectName objectName = scheduler.getObjectName();

                  Listener listener = new Listener();
                  connection.addNotificationListener(objectName, listener, null, null);
                  System.out.println("added listener " + objectName.getCanonicalName());
View Full Code Here

TOP

Related Classes of org.jwatch.domain.instance.QuartzInstance

Copyright © 2018 www.massapicom. 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.