/** * Starts or restarts monitoring, by opening in append-mode, the * file specified by the <code>fileName</code> attribute, * if specified. Otherwise the data will be written to standard * output. */ public void startMonitoring() throws IOException { if (file == null) { writer = new PrintWriter(new BufferedOutputStream(System.out)); } else { writer = new PrintWriter(new FileWriter(file, true)); } super.startMonitoring(); }
/** * Starts or restarts monitoring, by opening in append-mode, the * file specified by the <code>fileName</code> attribute, * if specified. Otherwise the data will be written to standard * output. */ public void startMonitoring() throws IOException { if (file == null) { writer = new PrintWriter(new BufferedOutputStream(System.out)); } else { writer = new PrintWriter(new FileWriter(file, true)); } super.startMonitoring(); }
@Override public synchronized void startMonitoring() throws IOException { for (Map.Entry<String, JMXContextMBean> beanEntry : JMXBeans.entrySet()) { ObjectName registeredName = MBeanUtil.registerMBean(getContextName(), beanEntry.getKey(), beanEntry.getValue()); beanHandles.put(beanEntry.getValue(), registeredName); } super.startMonitoring(); }