@Test public void contextStop() throws Exception { String randomizedObjectNameAsStr = "ch.qos.logback." + diff + ":Name=" + lc.getName() + ",Type=" + this.getClass().getName(); ObjectName objectName = MBeanUtil.string2ObjectName(lc, this, randomizedObjectNameAsStr); JMXConfigurator jmxConfigurator = new JMXConfigurator(lc, mbs, objectName); mbs.registerMBean(jmxConfigurator, objectName); listenerList = lc.getCopyOfListenerList(); assertEquals(1, listenerList.size()); lc.stop(); listenerList = lc.getCopyOfListenerList(); assertEquals(0, listenerList.size()); assertFalse(mbs.isRegistered(objectName)); }
private void stop() { started = false; clearFields(); }
JMXConfigurator extends ContextAwareBase implements JMXConfiguratorMBean, LoggerContextListener { private void stop() { started = false; clearFields(); } }
JMXConfigurator extends ContextAwareBase implements JMXConfiguratorMBean, LoggerContextListener { private void stop() { started = false; clearFields(); } JMXConfigurator(LoggerContext loggerContext, MBeanServer mbs, ObjectName objectName); }
JMXConfigurator extends ContextAwareBase implements JMXConfiguratorMBean, LoggerContextListener { private void stop() { started = false; clearFields(); } JMXConfigurator(LoggerContext loggerContext, MBeanServer mbs, ObjectName objectName); void reloadDefaultConfiguration(); void reloadByFileName(String fileName); void reloadByURL(URL url); void setLoggerLevel(String loggerName, String levelStr); String getLoggerLevel(String loggerName); String getLoggerEffectiveLevel(String loggerName); List<String> getLoggerList(); List<String> getStatuses(); void onStop(LoggerContext context); void onLevelChange(Logger logger, Level level); void onReset(LoggerContext context); boolean isResetResistant(); void onStart(LoggerContext context); @Override String toString(); }
JMXConfigurator extends ContextAwareBase implements JMXConfiguratorMBean, LoggerContextListener { private void stop() { started = false; clearFields(); } JMXConfigurator(LoggerContext loggerContext, MBeanServer mbs, ObjectName objectName); void reloadDefaultConfiguration(); void reloadByFileName(String fileName); void reloadByURL(URL url); void setLoggerLevel(String loggerName, String levelStr); String getLoggerLevel(String loggerName); String getLoggerEffectiveLevel(String loggerName); List<String> getLoggerList(); List<String> getStatuses(); void onStop(LoggerContext context); void onLevelChange(Logger logger, Level level); void onReset(LoggerContext context); boolean isResetResistant(); void onStart(LoggerContext context); @Override String toString();  }