Class LogQueue
java.lang.Object
com.netscape.cms.logging.LogQueue
A class represents a log queue. A log queue
is a queue of pending log events to be dispatched
to a set of registered LogEventListeners.
- Version:
- $Revision$, $Date$
- Author:
- mzhao
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLogEventListener(LogEventListener listener) Registers an event listener.voidflush()Flushes log queue, flushes all registered listeners.static LogQueuevoidinit()Initializes the log queue.voidDispatch the log event to all registered log event listeners.voidremoveLogEventListener(LogEventListener listener) Removes an event listener.voidshutdown()Stops this log queue: shuts down all registered listeners.
-
Field Details
-
mListeners
-
-
Constructor Details
-
LogQueue
public LogQueue()Constructs a log queue.
-
-
Method Details
-
getInstance
-
init
public void init()Initializes the log queue. -
shutdown
public void shutdown()Stops this log queue: shuts down all registered listeners. -
addLogEventListener
Registers an event listener.- Parameters:
listener- The log event listener to be registered to this queue.
-
removeLogEventListener
Removes an event listener.- Parameters:
listener- The log event listener to be removed from this queue.
-
log
Dispatch the log event to all registered log event listeners.- Parameters:
event- the log event
-
flush
public void flush()Flushes log queue, flushes all registered listeners. Messages should be written to their destination.
-