Package javax.management.monitor

Examples of javax.management.monitor.GaugeMonitor.start()


    gm.setThresholds(thresholdHigh,thresholdLow);
    gm.setDifferenceMode(true);
    gm.addNotificationListener(new GaugeListener(),null,null);
    try {
      ObjectName objectNameG = new ObjectName("XFire:name="+serviceName+"GaugeMonitor,"+"type=management");
      gm.start()
      mbs.registerMBean(gm, objectNameG);
   
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here


                    notificationSet.notify();
                }
            }
        }, null, null);
        service.start();
        monitorMBean.start();
        synchronized (notificationSet) {
            if (!notificationSet.get()) {
                notificationSet.wait(5000);
            }
        }
View Full Code Here

         {
            System.out.println(notification);
         }
      }, null, null);
      // Setup the monitor: start it
      monitorMBean.start();

      // Now start also the service
      serviceMBean.start();
   }
}
View Full Code Here

            times.set(times.get() + 1);
            holder.set(notification);
         }
      };
      server.addNotificationListener(monitorName, listener, null, null);
      monitor.start();

      try
      {
         sleep(period * 3);
         assertEquals(times.get(), 0);
View Full Code Here

            times.set(times.get() + 1);
            holder.set(notification);
         }
      };
      server.addNotificationListener(monitorName, listener, null, null);
      monitor.start();

      try
      {
         // Inside the thresholds, be sure low notification
         sleep(period * 3);
 
View Full Code Here

      MonitorTarget target = new MonitorTarget();
      int gauge = 4;
      target.setInteger(gauge);
      server.registerMBean(target, name);

      monitor.start();

      try
      {
         sleep(period * 3);

 
View Full Code Here

                    notificationSet.notify();
                }
            }
        }, null, null);
        service.start();
        monitorMBean.start();
        synchronized (notificationSet) {
            if (!notificationSet.get()) {
                notificationSet.wait(5000);
            }
        }
View Full Code Here

    }
    else {
      monitor.setThresholds(new Integer(upperThreshold), new Integer(lowerThreshold));
    }
    if (autoStart) {
      monitor.start();
    }
    return monitor;
  }

  public Class<?> getObjectType() {
View Full Code Here

            int granularityperiod = 500;
            gaugeMonitor.setGranularityPeriod(granularityperiod);
            echo("\tATTRIBUTE \"GranularityPeriod\" = " + granularityperiod);

            echo(">>> START the GaugeMonitor");
            gaugeMonitor.start();

            // Wait for granularity period (multiplied by 2 for sure)
            //
            Thread.sleep(granularityperiod * 2);

 
View Full Code Here

            int granularityperiod = 500;
            gaugeMonitor.setGranularityPeriod(granularityperiod);
            echo("\tATTRIBUTE \"GranularityPeriod\" = " + granularityperiod);

            echo(">>> START the GaugeMonitor");
            gaugeMonitor.start();

            // Wait for granularity period (multiplied by 2 for sure)
            //
            Thread.sleep(granularityperiod * 2);

 
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.