|
xmlBlaster 2.1.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.logging.Handler
org.xmlBlaster.util.log.XbNotifyHandler
public class XbNotifyHandler
Dispatch logging output to registered listeners. As java.util.logging framework supports max. one Filter per Logger/Handler we dispatch it further here.
Note: You may not directly add a Filter to java.util.logging.Logger/Handler as this would destroy our registration. Setup is done in logging.properties: handlers= java.util.logging.ConsoleHandler, org.xmlBlaster.util.log.XbNotifyHandler If deploying xmlBlasterClient.jar to tomcat you may edit xmlBlasterClient.jar#logging.properties and remove XbNotifyHandler to avoid a ClassLoaderException
| Field Summary | |
|---|---|
private I_LogListener[] |
allCache
|
private java.util.Set |
allListenerSet
|
private I_LogListener[] |
emptyArr
|
private I_LogListener[] |
errorCache
|
private java.util.Set |
errorListenerSet
|
private boolean |
hasAllListener
|
private java.lang.String |
id
|
private static long |
instanceCounter
|
private static XbNotifyHandler |
theXbNotifyHandler
|
private I_LogListener[] |
warnCache
|
private java.util.Set |
warnListenerSet
|
| Constructor Summary | |
|---|---|
XbNotifyHandler()
|
|
XbNotifyHandler(java.lang.String id)
|
|
| Method Summary | |
|---|---|
void |
close()
|
void |
flush()
|
I_LogListener[] |
getAllListeners()
Get a snapshot of all listeners. |
I_LogListener[] |
getErrorListeners()
Get a snapshot of error listeners. |
java.lang.String |
getId()
|
I_LogListener[] |
getWarnListeners()
Get a snapshot of warn listeners. |
static XbNotifyHandler |
instance()
|
static void |
main(java.lang.String[] args)
|
void |
publish(java.util.logging.LogRecord record)
|
boolean |
register(int level,
I_LogListener logNotification)
Register a listener. |
boolean |
unregister(int level,
I_LogListener logNotification)
Remove the listener. |
| Methods inherited from class java.util.logging.Handler |
|---|
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static XbNotifyHandler theXbNotifyHandler
private final java.lang.String id
private static long instanceCounter
private java.util.Set errorListenerSet
private I_LogListener[] errorCache
private java.util.Set warnListenerSet
private I_LogListener[] warnCache
private java.util.Set allListenerSet
private I_LogListener[] allCache
private final I_LogListener[] emptyArr
private boolean hasAllListener
| Constructor Detail |
|---|
public XbNotifyHandler()
public XbNotifyHandler(java.lang.String id)
| Method Detail |
|---|
public static XbNotifyHandler instance()
public void close()
throws java.lang.SecurityException
close in class java.util.logging.Handlerjava.lang.SecurityExceptionpublic void flush()
flush in class java.util.logging.Handlerpublic void publish(java.util.logging.LogRecord record)
publish in class java.util.logging.Handler
public boolean register(int level,
I_LogListener logNotification)
level/logNotification combination is already registered,
the call leaves everything unchanged and returns false.
level - to add, Level.SEVERE.intValue() | Level.WARNING.intValue() | Level.ALL.intValue()logNotification - The interface to send the logging
public boolean unregister(int level,
I_LogListener logNotification)
level - Which levels you want to remove. Level.SEVERE.intValue() | Level.WARNING.intValue() | Level.ALL.intValue()
public I_LogListener[] getWarnListeners()
public java.lang.String getId()
public I_LogListener[] getErrorListeners()
public I_LogListener[] getAllListeners()
public static void main(java.lang.String[] args)
|
xmlBlaster 2.1.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||