|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.utils.logging.LogPublisher cz.cuni.amis.pogamut.base.utils.logging.jmx.JMXLogPublisher
public class JMXLogPublisher
Nested Class Summary |
---|
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.base.utils.logging.LogPublisher |
---|
LogPublisher.ConsolePublisher, LogPublisher.FilePublisher |
Field Summary | |
---|---|
protected java.lang.String |
categoryName
Category name of the publisher. |
protected javax.management.NotificationBroadcasterSupport |
notification
Support for the JMX notification broadcasting. |
protected long |
sequenceNumber
Sequence number for the published logs. |
Fields inherited from class cz.cuni.amis.pogamut.base.utils.logging.LogPublisher |
---|
formatter |
Constructor Summary | |
---|---|
JMXLogPublisher()
Initialize publisher with the simplest formatter - just publishing the message. |
|
JMXLogPublisher(java.util.logging.Formatter formatter)
Initialize the publisher with prespecified formatter. |
|
JMXLogPublisher(javax.management.ObjectName parent,
java.lang.String categoryName)
|
Method Summary | |
---|---|
void |
addNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
|
void |
close()
From JavaDoc API: |
void |
flush()
From JavaDoc API: |
java.lang.String |
getCategoryName()
|
javax.management.MBeanNotificationInfo[] |
getNotificationInfo()
|
void |
publish(java.util.logging.LogRecord record)
From JavaDoc API: |
void |
publish(java.util.logging.LogRecord record,
java.lang.String formattedMsg)
Not used, things are published directly via publish(LogRecord) |
void |
removeNotificationListener(javax.management.NotificationListener listener)
|
void |
removeNotificationListener(javax.management.NotificationListener listener,
javax.management.NotificationFilter filter,
java.lang.Object handback)
|
Methods inherited from class cz.cuni.amis.pogamut.base.utils.logging.LogPublisher |
---|
getFormatter, setFormatter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.management.NotificationBroadcasterSupport notification
protected java.lang.String categoryName
protected long sequenceNumber
Constructor Detail |
---|
public JMXLogPublisher()
public JMXLogPublisher(java.util.logging.Formatter formatter)
WARNING: if formatter is null, nothing will be published via JMX!
formatter
- public JMXLogPublisher(javax.management.ObjectName parent, java.lang.String categoryName) throws javax.management.MalformedObjectNameException
javax.management.MalformedObjectNameException
Method Detail |
---|
public java.lang.String getCategoryName()
getCategoryName
in interface JMXLogPublisherMBean
public void close() throws java.lang.SecurityException
ILogPublisher
Close the Handler and free all associated resources.
The close method will perform a flush and then close the Handler. After close has been called this Handler should no longer be used. Method calls may either be silently ignored or may throw runtime exceptions.
close
in interface ILogPublisher
close
in class LogPublisher
java.lang.SecurityException
- if a security manager exists and if
the caller does not have LoggingPermission("control").public void flush()
ILogPublisher
Flush any buffered output.
flush
in interface ILogPublisher
flush
in class LogPublisher
public void publish(java.util.logging.LogRecord record)
ILogPublisher
Publish a LogRecord.
The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.
The Handler is responsible for formatting the message, when and if necessary. The formatting should include localization.
publish
in interface ILogPublisher
publish
in class LogPublisher
record
- description of the log event. A null record is
silently ignored and is not publishedpublic void publish(java.util.logging.LogRecord record, java.lang.String formattedMsg)
publish
in class LogPublisher
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 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 javax.management.MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface javax.management.NotificationBroadcaster
public void removeNotificationListener(javax.management.NotificationListener listener) throws javax.management.ListenerNotFoundException
removeNotificationListener
in interface javax.management.NotificationBroadcaster
javax.management.ListenerNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |