Class 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mListeners

        protected java.util.Vector<com.netscape.certsrv.logging.ILogEventListener> mListeners
    • Constructor Detail

      • LogQueue

        public LogQueue()
        Constructs a log queue.
    • Method Detail

      • getLogQueue

        public static com.netscape.certsrv.logging.ILogQueue getLogQueue()
      • init

        public void init()
        Initializes the log queue.

        Specified by:
        init in interface com.netscape.certsrv.logging.ILogQueue
      • shutdown

        public void shutdown()
        Stops this log queue: shuts down all registered listeners

        Specified by:
        shutdown in interface com.netscape.certsrv.logging.ILogQueue
      • addLogEventListener

        public void addLogEventListener​(com.netscape.certsrv.logging.ILogEventListener listener)
        Adds an event listener.
        Specified by:
        addLogEventListener in interface com.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 interface com.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 interface com.netscape.certsrv.logging.ILogQueue
        Parameters:
        event - the log event
      • flush

        public void flush()
        Flushes the log buffers (if any)
        Specified by:
        flush in interface com.netscape.certsrv.logging.ILogQueue