Package org.jboss.monitor

Examples of org.jboss.monitor.StringThresholdMonitor


      }
      else
      {
         try
         {
            StringThresholdMonitor monitor = new StringThresholdMonitor();

            monitor.setMonitorName(monitorName);
            monitor.setObservedObject(oname);
            monitor.setObservedAttribute(attribute);
            monitor.setThreshold(threshold);
            monitor.setEnabled(new Boolean(enabled).booleanValue());
            monitor.setPeriod(timePeriod);
            monitor.setEqualityTriggersAlert(equality);
            ArrayList list = new ArrayList();
            for (int i = 0; i < alerts.length; i++)
            {
               list.add(new ObjectName(alerts[i]));
            }
            monitor.setAlertListeners(list);
            mbeanServer.registerMBean(monitor, new ObjectName("jboss.monitor:name=" + monitorName));
            monitor.create();
            monitor.start();
         }
         catch (Exception ex)
         {
            error("Failed to create non-persisted monitor: " + ex.toString(), req, resp);
         }
View Full Code Here

TOP

Related Classes of org.jboss.monitor.StringThresholdMonitor

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.