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 theAppenderAdminMBeaninterface.
-
-
Field Summary
Fields Modifier and Type Field Description private Appenderappenderprivate java.lang.StringcontextNameprivate javax.management.ObjectNameobjectName-
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 newAppenderAdminwith the specified contextName and appender.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetErrorHandler()Returns the result of callingtoStringon the error handler of this appender, or"null"if no error handler was set.java.lang.StringgetFilter()Returns a string description of all filters configured for the instrumentedAppender.java.lang.StringgetLayout()Returns the result of callingtoStringon theLayoutobject of the instrumentedAppender.java.lang.StringgetName()Returns the name of the instrumentedAppender.javax.management.ObjectNamegetObjectName()Returns theObjectNameof this mbean.booleanisIgnoreExceptions()Returns how exceptions thrown on the instrumentedAppenderare 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 newAppenderAdminwith the specified contextName and appender.- Parameters:
contextName- used in theObjectNamefor this mbeanappender- the instrumented object
-
-
Method Detail
-
getObjectName
public javax.management.ObjectName getObjectName()
Returns theObjectNameof this mbean.- Returns:
- the
ObjectName - See Also:
AppenderAdminMBean.PATTERN
-
getName
public java.lang.String getName()
Description copied from interface:AppenderAdminMBeanReturns the name of the instrumentedAppender.- Specified by:
getNamein interfaceAppenderAdminMBean- Returns:
- the name of the Appender
-
getLayout
public java.lang.String getLayout()
Description copied from interface:AppenderAdminMBeanReturns the result of callingtoStringon theLayoutobject of the instrumentedAppender.- Specified by:
getLayoutin interfaceAppenderAdminMBean- Returns:
- the
Layoutof the instrumentedAppenderas a string
-
isIgnoreExceptions
public boolean isIgnoreExceptions()
Description copied from interface:AppenderAdminMBeanReturns how exceptions thrown on the instrumentedAppenderare handled.- Specified by:
isIgnoreExceptionsin interfaceAppenderAdminMBean- Returns:
trueif any exceptions thrown by the Appender will be logged orfalseif such exceptions are re-thrown.
-
getErrorHandler
public java.lang.String getErrorHandler()
Description copied from interface:AppenderAdminMBeanReturns the result of callingtoStringon the error handler of this appender, or"null"if no error handler was set.- Specified by:
getErrorHandlerin interfaceAppenderAdminMBean- Returns:
- result of calling
toStringon the error handler of this appender, or"null"
-
getFilter
public java.lang.String getFilter()
Description copied from interface:AppenderAdminMBeanReturns a string description of all filters configured for the instrumentedAppender.- Specified by:
getFilterin interfaceAppenderAdminMBean- Returns:
- a string description of all configured filters for this appender
-
-