Class AppenderAdmin
- java.lang.Object
-
- org.apache.logging.log4j.core.jmx.AppenderAdmin
-
- All Implemented Interfaces:
AppenderAdminMBean
public class AppenderAdmin extends java.lang.Object implements AppenderAdminMBean
Implementation of theAppenderAdminMBean
interface.
-
-
Field Summary
Fields Modifier and Type Field Description private Appender
appender
private java.lang.String
contextName
private javax.management.ObjectName
objectName
-
Fields inherited from interface org.apache.logging.log4j.core.jmx.AppenderAdminMBean
PATTERN
-
-
Constructor Summary
Constructors Constructor Description AppenderAdmin(java.lang.String contextName, Appender appender)
Constructs a newAppenderAdmin
with the specified contextName and appender.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getErrorHandler()
Returns the result of callingtoString
on the error handler of this appender, or"null"
if no error handler was set.java.lang.String
getFilter()
Returns a string description of all filters configured for the instrumentedAppender
.java.lang.String
getLayout()
Returns the result of callingtoString
on theLayout
object of the instrumentedAppender
.java.lang.String
getName()
Returns the name of the instrumentedAppender
.javax.management.ObjectName
getObjectName()
Returns theObjectName
of this mbean.boolean
isIgnoreExceptions()
Returns how exceptions thrown on the instrumentedAppender
are handled.
-
-
-
Field Detail
-
contextName
private final java.lang.String contextName
-
appender
private final Appender appender
-
objectName
private final javax.management.ObjectName objectName
-
-
Constructor Detail
-
AppenderAdmin
public AppenderAdmin(java.lang.String contextName, Appender appender)
Constructs a newAppenderAdmin
with the specified contextName and appender.- Parameters:
contextName
- used in theObjectName
for this mbeanappender
- the instrumented object
-
-
Method Detail
-
getObjectName
public javax.management.ObjectName getObjectName()
Returns theObjectName
of this mbean.- Returns:
- the
ObjectName
- See Also:
AppenderAdminMBean.PATTERN
-
getName
public java.lang.String getName()
Description copied from interface:AppenderAdminMBean
Returns the name of the instrumentedAppender
.- Specified by:
getName
in interfaceAppenderAdminMBean
- Returns:
- the name of the Appender
-
getLayout
public java.lang.String getLayout()
Description copied from interface:AppenderAdminMBean
Returns the result of callingtoString
on theLayout
object of the instrumentedAppender
.- Specified by:
getLayout
in interfaceAppenderAdminMBean
- Returns:
- the
Layout
of the instrumentedAppender
as a string
-
isIgnoreExceptions
public boolean isIgnoreExceptions()
Description copied from interface:AppenderAdminMBean
Returns how exceptions thrown on the instrumentedAppender
are handled.- Specified by:
isIgnoreExceptions
in interfaceAppenderAdminMBean
- Returns:
true
if any exceptions thrown by the Appender will be logged orfalse
if such exceptions are re-thrown.
-
getErrorHandler
public java.lang.String getErrorHandler()
Description copied from interface:AppenderAdminMBean
Returns the result of callingtoString
on the error handler of this appender, or"null"
if no error handler was set.- Specified by:
getErrorHandler
in interfaceAppenderAdminMBean
- Returns:
- result of calling
toString
on the error handler of this appender, or"null"
-
getFilter
public java.lang.String getFilter()
Description copied from interface:AppenderAdminMBean
Returns a string description of all filters configured for the instrumentedAppender
.- Specified by:
getFilter
in interfaceAppenderAdminMBean
- Returns:
- a string description of all configured filters for this appender
-
-