ch.qos.logback.classic.jmx

## Class JMXConfigurator

- java.lang.Object
- - ch.qos.logback.core.spi.ContextAwareBase
  - - ch.qos.logback.classic.jmx.JMXConfigurator

All Implemented Interfaces:
  JMXConfiguratorMBean, LoggerContextListener, ContextAware

    public class JMXConfigurator
    extends ContextAwareBase
    implements JMXConfiguratorMBean, LoggerContextListener

A class that provides access to logback components via JMX.

Since this class implements `JMXConfiguratorMBean` it has to be named as JMXConfigurator}.

Author:
  Ceki Gülcü, Sébastien Pennec Contributor: Sebastian Davids See http://bugzilla.qos.ch/show_bug.cgi?id=35

### Field Summary

### Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

`context`

### Constructor Summary

Constructors
Constructor and Description
`JMXConfigurator(LoggerContext loggerContext, javax.management.MBeanServer mbs, javax.management.ObjectName objectName)`

### Method Summary

Methods
`java.lang.String` `getLoggerEffectiveLevel(java.lang.String loggerName)`
`java.lang.String` `getLoggerLevel(java.lang.String loggerName)`
`java.util.List<java.lang.String>` `getLoggerList()`
`java.util.List<java.lang.String>` `getStatuses()`
`boolean` `isResetResistant()` JMXConfigurator should not be removed subsequent to a LoggerContext reset.
`void` `onLevelChange(Logger logger, Level level)`
`void` `onReset(LoggerContext context)`
`void` `onStart(LoggerContext context)`
`void` `onStop(LoggerContext context)` When the associated LoggerContext is stopped, this configurator must be unregistered
`void` `reloadByFileName(java.lang.String fileName)`
`void` `reloadByURL(java.net.URL url)`
`void` `reloadDefaultConfiguration()`
`void` `setLoggerLevel(java.lang.String loggerName, java.lang.String levelStr)`
`java.lang.String` `toString()`

### Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### JMXConfigurator

    public JMXConfigurator(LoggerContext loggerContext,
                   javax.management.MBeanServer mbs,
                   javax.management.ObjectName objectName)

### Method Detail

#### reloadDefaultConfiguration

    public void reloadDefaultConfiguration()
                                    throws JoranException

Specified by:
  `reloadDefaultConfiguration` in interface `JMXConfiguratorMBean`
Throws:
  `JoranException`

#### reloadByFileName

    public void reloadByFileName(java.lang.String fileName)
                          throws JoranException,
                                 java.io.FileNotFoundException

Specified by:
  `reloadByFileName` in interface `JMXConfiguratorMBean`
Throws:
  `JoranException`
  `java.io.FileNotFoundException`

#### reloadByURL

    public void reloadByURL(java.net.URL url)
                     throws JoranException

Specified by:
  `reloadByURL` in interface `JMXConfiguratorMBean`
Throws:
  `JoranException`

#### setLoggerLevel

    public void setLoggerLevel(java.lang.String loggerName,
                      java.lang.String levelStr)

Specified by:
  `setLoggerLevel` in interface `JMXConfiguratorMBean`

#### getLoggerLevel

    public java.lang.String getLoggerLevel(java.lang.String loggerName)

Specified by:
  `getLoggerLevel` in interface `JMXConfiguratorMBean`

#### getLoggerEffectiveLevel

    public java.lang.String getLoggerEffectiveLevel(java.lang.String loggerName)

Specified by:
  `getLoggerEffectiveLevel` in interface `JMXConfiguratorMBean`

#### getLoggerList

    public java.util.List<java.lang.String> getLoggerList()

Specified by:
  `getLoggerList` in interface `JMXConfiguratorMBean`

#### getStatuses

    public java.util.List<java.lang.String> getStatuses()

Specified by:
  `getStatuses` in interface `JMXConfiguratorMBean`

#### onStop

    public void onStop(LoggerContext context)

When the associated LoggerContext is stopped, this configurator must be unregistered

Specified by:
  `onStop` in interface `LoggerContextListener`

#### onLevelChange

    public void onLevelChange(Logger logger,
                     Level level)

Specified by:
  `onLevelChange` in interface `LoggerContextListener`

#### onReset

    public void onReset(LoggerContext context)

Specified by:
  `onReset` in interface `LoggerContextListener`

#### isResetResistant

    public boolean isResetResistant()

JMXConfigurator should not be removed subsequent to a LoggerContext reset.

Specified by:
  `isResetResistant` in interface `LoggerContextListener`
Returns:

#### onStart

    public void onStart(LoggerContext context)

Specified by:
  `onStart` in interface `LoggerContextListener`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`