public MBeanInfo getMBeanInfo() { if (etmMonitor.isCollecting()) { return activeInfo; } else { return inactiveInfo; } }
public MBeanInfo getMBeanInfo() { if (etmMonitor.isCollecting()) { return activeInfo; } else { return inactiveInfo; } }
public Object getAttribute(String string) throws AttributeNotFoundException, MBeanException, ReflectionException { if ("started".equals(string)) { return (etmMonitor.isStarted()) ? Boolean.TRUE : Boolean.FALSE; } else if ("collecting".equals(string)) { return (etmMonitor.isCollecting()) ? Boolean.TRUE : Boolean.FALSE; } else if ("startDate".equals(string)) { return (etmMonitor.getMetaData().getStartTime()); } else if ("lastResetDate".equals(string)) { return etmMonitor.getMetaData().getLastResetTime(); } else { throw new AttributeNotFoundException(string); } }
public Object getAttribute(String string) throws AttributeNotFoundException, MBeanException, ReflectionException { if ("started".equals(string)) { return (etmMonitor.isStarted()) ? Boolean.TRUE : Boolean.FALSE; } else if ("collecting".equals(string)) { return (etmMonitor.isCollecting()) ? Boolean.TRUE : Boolean.FALSE; } else if ("startDate".equals(string)) { return (etmMonitor.getMetaData().getStartTime()); } else if ("lastResetDate".equals(string)) { return etmMonitor.getMetaData().getLastResetTime(); } else { throw new AttributeNotFoundException(string); } }
public void testCollectionStop() throws Exception { executeRequest("/stop"); assertFalse(monitor.isCollecting()); }
public void testCollectionStart() throws Exception { // we stop our monitor and activate it using the console monitor.disableCollection(); executeRequest("/start"); assertTrue(monitor.isCollecting()); }
public void testAutostartConfig() throws Exception { URL url = locateResource("autostart-on-config.xml"); EtmManager.reset(); XmlEtmConfigurator.configure(url); EtmMonitor etmMonitor = EtmManager.getEtmMonitor(); assertTrue(etmMonitor.isStarted()); assertTrue(etmMonitor.isCollecting()); etmMonitor.stop(); url = locateResource("autostart-off-config.xml"); EtmManager.reset(); XmlEtmConfigurator.configure(url); etmMonitor = EtmManager.getEtmMonitor(); assertFalse(etmMonitor.isStarted()); assertTrue(etmMonitor.isCollecting()); }
public void testAutostartConfig() throws Exception { URL url = locateResource("autostart-on-config.xml"); EtmManager.reset(); XmlEtmConfigurator.configure(url); EtmMonitor etmMonitor = EtmManager.getEtmMonitor(); assertTrue(etmMonitor.isStarted()); assertTrue(etmMonitor.isCollecting()); etmMonitor.stop(); url = locateResource("autostart-off-config.xml"); EtmManager.reset(); XmlEtmConfigurator.configure(url); etmMonitor = EtmManager.getEtmMonitor(); assertFalse(etmMonitor.isStarted()); assertTrue(etmMonitor.isCollecting()); }
" <td class=\"noborder\">Collecting status:</td>\n"); if (request.getEtmMonitor().isCollecting()) { response.write(" <td class=\"noborder\">\n"); response.write("<a href=\"");