org.apache.logging.log4j.core.jmx
Interface LoggerContextAdminMBean

All Known Implementing Classes:
LoggerContextAdmin

public interface LoggerContextAdminMBean

The MBean interface for monitoring and managing a LoggerContext.


Field Summary
static String NOTIF_TYPE_RECONFIGURED
          Notification that the Configuration of the instrumented LoggerContext has been reconfigured.
static String PATTERN
          ObjectName pattern for LoggerContextAdmin MBeans.
 
Method Summary
 String getConfigClassName()
          Returns the class name of the Configuration of the instrumented LoggerContext.
 String getConfigFilter()
          Returns a string description of all Filters configured in the Configuration of the instrumented LoggerContext.
 String getConfigLocationURI()
          Returns the configuration location URI as a String.
 String getConfigMonitorClassName()
          Returns the class name of the object that is monitoring the configuration file for modifications.
 String getConfigName()
          Returns the name of the Configuration of the instrumented LoggerContext.
 Map<String,String> getConfigProperties()
          Returns a map with configured properties.
 String getConfigText()
          Returns the configuration text, which may be the contents of the configuration file or the text that was last set with a call to setConfigText.
 String getName()
          Returns the name of the instrumented LoggerContext.
 String getStatus()
          Returns the status of the instrumented LoggerContext.
 void setConfigLocationURI(String configLocation)
          Sets the configuration location to the specified URI.
 void setConfigText(String configText, String charsetName)
          Sets the configuration text.
 

Field Detail

PATTERN

static final String PATTERN
ObjectName pattern for LoggerContextAdmin MBeans.

See Also:
Constant Field Values

NOTIF_TYPE_RECONFIGURED

static final String NOTIF_TYPE_RECONFIGURED
Notification that the Configuration of the instrumented LoggerContext has been reconfigured. Notifications of this type do not carry a message or user data.

See Also:
Constant Field Values
Method Detail

getStatus

String getStatus()
Returns the status of the instrumented LoggerContext.

Returns:
the LoggerContext status.

getName

String getName()
Returns the name of the instrumented LoggerContext.

Returns:
the name of the instrumented LoggerContext.

getConfigLocationURI

String getConfigLocationURI()
Returns the configuration location URI as a String.

Returns:
the configuration location

setConfigLocationURI

void setConfigLocationURI(String configLocation)
                          throws URISyntaxException,
                                 IOException
Sets the configuration location to the specified URI. This will cause the instrumented LoggerContext to reconfigure.

Parameters:
configLocation - location of the configuration file in URI format.
Throws:
URISyntaxException - if the format of the specified configLocationURI is incorrect
IOException - if an error occurred reading the specified location

getConfigText

String getConfigText()
                     throws IOException
Returns the configuration text, which may be the contents of the configuration file or the text that was last set with a call to setConfigText.

Returns:
the configuration text
Throws:
IOException - if a problem occurred reading the contents of the config file.

setConfigText

void setConfigText(String configText,
                   String charsetName)
Sets the configuration text. This does not replace the contents of the configuration file, but does cause the instrumented LoggerContext to be reconfigured with the specified text.

Parameters:
configText - the configuration text in XML or JSON format
charsetName - name of the Charset used to convert the specified configText to bytes
Throws:
IllegalArgumentException - if a problem occurs configuring from the specified text

getConfigName

String getConfigName()
Returns the name of the Configuration of the instrumented LoggerContext.

Returns:
the Configuration name

getConfigClassName

String getConfigClassName()
Returns the class name of the Configuration of the instrumented LoggerContext.

Returns:
the class name of the Configuration.

getConfigFilter

String getConfigFilter()
Returns a string description of all Filters configured in the Configuration of the instrumented LoggerContext.

Returns:
a string description of all Filters configured

getConfigMonitorClassName

String getConfigMonitorClassName()
Returns the class name of the object that is monitoring the configuration file for modifications.

Returns:
the class name of the object that is monitoring the configuration file for modifications

getConfigProperties

Map<String,String> getConfigProperties()
Returns a map with configured properties.

Returns:
a map with configured properties.


Copyright © 1999-2013 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.