org.objectweb.util.monolog.wrapper.log4j
Class JMXHandler
java.lang.Object
org.apache.log4j.AppenderSkeleton
org.objectweb.util.monolog.wrapper.log4j.JMXHandler
- All Implemented Interfaces:
- org.apache.log4j.Appender, Handler, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.apache.log4j.spi.OptionHandler
- public class JMXHandler
- extends org.apache.log4j.AppenderSkeleton
- implements javax.management.NotificationEmitter, Handler
- Author:
- Sebastien Chassande-Barrioz
Field Summary |
protected java.util.HashMap |
prop
This fields contains the properties of the Handler |
Fields inherited from class org.apache.log4j.AppenderSkeleton |
closed, errorHandler, headFilter, layout, name, tailFilter, threshold |
Fields inherited from interface org.objectweb.util.monolog.api.Handler |
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 |
Method Summary |
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)
|
Methods inherited from class org.apache.log4j.AppenderSkeleton |
activateOptions, addFilter, clearFilters, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
prop
protected java.util.HashMap prop
- This fields contains the properties of the Handler
JMXHandler
public JMXHandler()
JMXHandler
public JMXHandler(java.lang.String name)
- It Builds a new JMXHandler.
- Parameters:
name
- is the handler name.
addNotificationListener
public void addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws java.lang.IllegalArgumentException
- Specified by:
addNotificationListener
in interface javax.management.NotificationBroadcaster
- Throws:
java.lang.IllegalArgumentException
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener)
throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interface javax.management.NotificationBroadcaster
- Throws:
javax.management.ListenerNotFoundException
removeNotificationListener
public void removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
throws javax.management.ListenerNotFoundException
- Specified by:
removeNotificationListener
in interface javax.management.NotificationEmitter
- Throws:
javax.management.ListenerNotFoundException
getNotificationInfo
public javax.management.MBeanNotificationInfo[] getNotificationInfo()
- Specified by:
getNotificationInfo
in interface javax.management.NotificationBroadcaster
getAttributes
public java.util.Map getAttributes()
setAttributes
public void setAttributes(java.util.Map attributes)
getType
public java.lang.String getType()
- Description copied from interface:
Handler
- It retrieves the Handler type
- Specified by:
getType
in interface Handler
getAttributeNames
public java.lang.String[] getAttributeNames()
- Description copied from interface:
Handler
- It retrieves the attributes of the handler
- Specified by:
getAttributeNames
in interface Handler
getAttribute
public java.lang.Object getAttribute(java.lang.String key)
- Description copied from interface:
Handler
- It retrieves the value of an attribute value of the handler.
- Specified by:
getAttribute
in interface Handler
- Parameters:
key
- is an attribute name
setAttribute
public java.lang.Object setAttribute(java.lang.String key,
java.lang.Object value)
- Description copied from interface:
Handler
- It assigns an attributte to the handler.
- Specified by:
setAttribute
in interface Handler
- Parameters:
key
- is the attribute namevalue
- is the attribute value
- Returns:
- the old value is the attribute was already defined
doAppend
public void doAppend(org.apache.log4j.spi.LoggingEvent event)
- Specified by:
doAppend
in interface org.apache.log4j.Appender
append
protected void append(org.apache.log4j.spi.LoggingEvent event)
close
public void close()
- Specified by:
close
in interface org.apache.log4j.Appender
requiresLayout
public boolean requiresLayout()
- Specified by:
requiresLayout
in interface org.apache.log4j.Appender