public class JMXHandler extends org.apache.log4j.AppenderSkeleton implements javax.management.NotificationEmitter, Handler
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap |
prop
This fields contains the properties of the Handler
|
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
APPEND_MODE_ATTRIBUTE, BUFFER_ATTRIBUTE, CONSOLE_HANDLER_TYPE, FILE_HANDLER_TYPE, FILE_NUMBER_ATTRIBUTE, GENERIC_HANDLER_TYPE, JMX_HANDLER_TYPE, LEVEL_ATTRIBUTE, LOGGER_HANDLER_TYPE, MAX_SIZE_ATTRIBUTE, OUTPUT_ATTRIBUTE, PATTERN_ATTRIBUTE, ROLLING_FILE_HANDLER_TYPE
Constructor and Description |
---|
JMXHandler() |
JMXHandler(java.lang.String name)
It Builds a new JMXHandler.
|
Modifier and Type | Method and Description |
---|---|
void |
addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback) |
protected void |
append(org.apache.log4j.spi.LoggingEvent event) |
void |
close() |
void |
doAppend(org.apache.log4j.spi.LoggingEvent event) |
java.lang.Object |
getAttribute(java.lang.String key)
It retrieves the value of an attribute value of the handler.
|
java.lang.String[] |
getAttributeNames()
It retrieves the attributes of the handler
|
java.util.Map |
getAttributes() |
javax.management.MBeanNotificationInfo[] |
getNotificationInfo() |
java.lang.String |
getType()
It retrieves the Handler type
|
void |
removeNotificationListener(javax.management.NotificationListener listener) |
void |
removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback) |
boolean |
requiresLayout() |
java.lang.Object |
setAttribute(java.lang.String key,
java.lang.Object value)
It assigns an attributte to the handler.
|
void |
setAttributes(java.util.Map attributes) |
activateOptions, addFilter, clearFilters, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
protected java.util.HashMap prop
public JMXHandler()
public JMXHandler(java.lang.String name)
name
- is the handler name.public void addNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws java.lang.IllegalArgumentException
addNotificationListener
in interface javax.management.NotificationBroadcaster
java.lang.IllegalArgumentException
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
removeNotificationListener
in interface javax.management.NotificationBroadcaster
javax.management.ListenerNotFoundException
public void removeNotificationListener(javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback) throws javax.management.ListenerNotFoundException
removeNotificationListener
in interface javax.management.NotificationEmitter
javax.management.ListenerNotFoundException
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface javax.management.NotificationBroadcaster
public java.util.Map getAttributes()
public void setAttributes(java.util.Map attributes)
public java.lang.String getType()
Handler
public java.lang.String[] getAttributeNames()
Handler
getAttributeNames
in interface Handler
public java.lang.Object getAttribute(java.lang.String key)
Handler
getAttribute
in interface Handler
key
- is an attribute namepublic java.lang.Object setAttribute(java.lang.String key, java.lang.Object value)
Handler
setAttribute
in interface Handler
key
- is the attribute namevalue
- is the attribute valuepublic void doAppend(org.apache.log4j.spi.LoggingEvent event)
doAppend
in interface org.apache.log4j.Appender
doAppend
in class org.apache.log4j.AppenderSkeleton
protected void append(org.apache.log4j.spi.LoggingEvent event)
append
in class org.apache.log4j.AppenderSkeleton
public void close()
close
in interface org.apache.log4j.Appender
public boolean requiresLayout()
requiresLayout
in interface org.apache.log4j.Appender