|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.apache.logging.log4j.core.jmx.LoggerContextAdmin
public class LoggerContextAdmin
Implementation of the LoggerContextAdminMBean interface.
| Field Summary |
|---|
| Fields inherited from interface org.apache.logging.log4j.core.jmx.LoggerContextAdminMBean |
|---|
NOTIF_TYPE_RECONFIGURED, PATTERN |
| Constructor Summary | |
|---|---|
LoggerContextAdmin(LoggerContext loggerContext,
Executor executor)
Constructs a new LoggerContextAdmin with the Executor to be used for sending Notification
s asynchronously to listeners. |
|
| 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 |
getConfigText(String charsetName)
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. |
ObjectName |
getObjectName()
Returns the ObjectName of this mbean. |
String |
getStatus()
Returns the status of the instrumented LoggerContext. |
void |
propertyChange(PropertyChangeEvent evt)
|
void |
setConfigLocationUri(String configLocation)
Sets the configuration location to the specified URI. |
void |
setConfigText(String configText,
String charsetName)
Sets the configuration text. |
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
|---|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LoggerContextAdmin(LoggerContext loggerContext,
Executor executor)
LoggerContextAdmin with the Executor to be used for sending Notification
s asynchronously to listeners.
executor - used to send notifications asynchronouslyloggerContext - the instrumented object| Method Detail |
|---|
public String getStatus()
LoggerContextAdminMBeanLoggerContext.
getStatus in interface LoggerContextAdminMBeanpublic String getName()
LoggerContextAdminMBeanLoggerContext.
getName in interface LoggerContextAdminMBeanLoggerContext.public String getConfigLocationUri()
LoggerContextAdminMBean
getConfigLocationUri in interface LoggerContextAdminMBean
public void setConfigLocationUri(String configLocation)
throws URISyntaxException,
IOException
LoggerContextAdminMBeanLoggerContext to reconfigure.
setConfigLocationUri in interface LoggerContextAdminMBeanconfigLocation - location of the configuration file in
URI format.
URISyntaxException - if the format of the specified
configLocationURI is incorrect
IOException - if an error occurred reading the specified locationpublic void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListener
public String getConfigText()
throws IOException
LoggerContextAdminMBeansetConfigText. If reading a file, this method assumes the file's
character encoding is UTF-8.
getConfigText in interface LoggerContextAdminMBeanIOException - if a problem occurred reading the contents of the
config file.
public String getConfigText(String charsetName)
throws IOException
LoggerContextAdminMBeansetConfigText.
getConfigText in interface LoggerContextAdminMBeancharsetName - the encoding to use to convert the file's bytes into
the resulting string.
IOException - if a problem occurred reading the contents of the
config file.
public void setConfigText(String configText,
String charsetName)
LoggerContextAdminMBeanLoggerContext to be reconfigured with the specified text.
setConfigText in interface LoggerContextAdminMBeanconfigText - the configuration text in XML or JSON formatcharsetName - name of the Charset used to convert the
specified configText to bytespublic String getConfigName()
LoggerContextAdminMBean
getConfigName in interface LoggerContextAdminMBeanpublic String getConfigClassName()
LoggerContextAdminMBeanConfiguration of the instrumented
LoggerContext.
getConfigClassName in interface LoggerContextAdminMBeanConfiguration.public String getConfigFilter()
LoggerContextAdminMBeanConfiguration of the instrumented LoggerContext.
getConfigFilter in interface LoggerContextAdminMBeanpublic String getConfigMonitorClassName()
LoggerContextAdminMBean
getConfigMonitorClassName in interface LoggerContextAdminMBeanpublic Map<String,String> getConfigProperties()
LoggerContextAdminMBean
getConfigProperties in interface LoggerContextAdminMBeanpublic ObjectName getObjectName()
ObjectName of this mbean.
getObjectName in interface LoggerContextAdminMBeanObjectNameLoggerContextAdminMBean.PATTERN
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 1999-2015 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.