Package com.netscape.cms.logging
Class LogQueue
- java.lang.Object
-
- com.netscape.cms.logging.LogQueue
-
- All Implemented Interfaces:
com.netscape.certsrv.logging.ILogQueue
public class LogQueue extends java.lang.Object implements com.netscape.certsrv.logging.ILogQueue
A class represents a log queue.- Version:
- $Revision$, $Date$
- Author:
- mzhao
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Vector<com.netscape.certsrv.logging.ILogEventListener>
mListeners
-
Constructor Summary
Constructors Constructor Description LogQueue()
Constructs a log queue.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLogEventListener(com.netscape.certsrv.logging.ILogEventListener listener)
Adds an event listener.void
flush()
Flushes the log buffers (if any)static com.netscape.certsrv.logging.ILogQueue
getLogQueue()
void
init()
Initializes the log queue.void
log(com.netscape.certsrv.logging.ILogEvent event)
Logs an event, and notifies logger to reuse the event.void
removeLogEventListener(com.netscape.certsrv.logging.ILogEventListener listener)
Removes an event listener.void
shutdown()
Stops this log queue: shuts down all registered listeners
-
-
-
Method Detail
-
getLogQueue
public static com.netscape.certsrv.logging.ILogQueue getLogQueue()
-
init
public void init()
Initializes the log queue.- Specified by:
init
in interfacecom.netscape.certsrv.logging.ILogQueue
-
shutdown
public void shutdown()
Stops this log queue: shuts down all registered listeners- Specified by:
shutdown
in interfacecom.netscape.certsrv.logging.ILogQueue
-
addLogEventListener
public void addLogEventListener(com.netscape.certsrv.logging.ILogEventListener listener)
Adds an event listener.- Specified by:
addLogEventListener
in interfacecom.netscape.certsrv.logging.ILogQueue
- Parameters:
listener
- the log event listener
-
removeLogEventListener
public void removeLogEventListener(com.netscape.certsrv.logging.ILogEventListener listener)
Removes an event listener.- Specified by:
removeLogEventListener
in interfacecom.netscape.certsrv.logging.ILogQueue
- Parameters:
listener
- the log event listener
-
log
public void log(com.netscape.certsrv.logging.ILogEvent event)
Logs an event, and notifies logger to reuse the event.- Specified by:
log
in interfacecom.netscape.certsrv.logging.ILogQueue
- Parameters:
event
- the log event
-
flush
public void flush()
Flushes the log buffers (if any)- Specified by:
flush
in interfacecom.netscape.certsrv.logging.ILogQueue
-
-