diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-03-24 02:27:47 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-03-26 11:43:54 -0500 |
commit | 621d9e5c413e561293d7484b93882d985b3fe15f (patch) | |
tree | 638f3d75761c121d9a8fb50b52a12a6686c5ac5c /base/common/src/com/netscape/certsrv/logging/ILogEventListener.java | |
parent | 40d3643b8d91886bf210aa27f711731c81a11e49 (diff) | |
download | pki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.gz pki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.xz pki-621d9e5c413e561293d7484b93882d985b3fe15f.zip |
Removed unnecessary pki folder.
Previously the source code was located inside a pki folder.
This folder was created during svn migration and is no longer
needed. This folder has now been removed and the contents have
been moved up one level.
Ticket #131
Diffstat (limited to 'base/common/src/com/netscape/certsrv/logging/ILogEventListener.java')
-rw-r--r-- | base/common/src/com/netscape/certsrv/logging/ILogEventListener.java | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/logging/ILogEventListener.java b/base/common/src/com/netscape/certsrv/logging/ILogEventListener.java new file mode 100644 index 000000000..15ff08ad5 --- /dev/null +++ b/base/common/src/com/netscape/certsrv/logging/ILogEventListener.java @@ -0,0 +1,135 @@ +// --- BEGIN COPYRIGHT BLOCK --- +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// +// (C) 2007 Red Hat, Inc. +// All rights reserved. +// --- END COPYRIGHT BLOCK --- +package com.netscape.certsrv.logging; + +import java.io.IOException; +import java.util.EventListener; +import java.util.Hashtable; +import java.util.Vector; + +import javax.servlet.ServletException; + +import com.netscape.certsrv.base.EBaseException; +import com.netscape.certsrv.base.IConfigStore; +import com.netscape.certsrv.base.ISubsystem; +import com.netscape.certsrv.common.NameValuePairs; + +/** + * An interface represents a log event listener. + * A ILogEventListener is registered to a specific + * ILogQueue to be notified of created ILogEvents. + * the log queue will notify all its registered listeners + * of the logged event. The listener will then proceed to + * process the event accordingly which will result in a log + * message existing in some file. + * + * @version $Revision$, $Date$ + */ +public interface ILogEventListener extends EventListener { + + /** + * The event notification method: Logs event. + * + * @param event The log event to be processed. + */ + public void log(ILogEvent event) throws ELogException; + + /** + * Flushes the log buffers (if any). Will result in the messages + * being actually written to their destination. + */ + public void flush(); + + /** + * Closes the log file and destroys any associated threads. + */ + public void shutdown(); + + /** + * Get the configuration store for the log event listener. + * + * @return The configuration store of this log event listener. + */ + public IConfigStore getConfigStore(); + + /** + * Initialize this log listener + * + * @param owner The subsystem. + * @param config Configuration store for this log listener. + * @exception initialization error. + */ + public void init(ISubsystem owner, IConfigStore config) + throws EBaseException; + + /** + * Startup the instance. + */ + public void startup() + throws EBaseException; + + /** + * Retrieve last "maxLine" number of system logs with log level >"level" + * and from source "source". If the parameter is omitted. All entries + * are sent back. + * + * @param req a Hashtable containing the required information such as + * log entry, log level, log source, and log name. + * @return NameValue pair list of log messages. + * @exception ServletException For Servelet errros. + * @exception IOException For input/output problems. + * @exception EBaseException For other problems. + */ + public NameValuePairs retrieveLogContent(Hashtable<String, String> req) throws ServletException, + IOException, EBaseException; + + /** + * Retrieve list of log files. + * + */ + public NameValuePairs retrieveLogList(Hashtable<String, String> req) throws ServletException, + IOException, EBaseException; + + /** + * Returns implementation name. + * + * @return String name of event listener implementation. + */ + public String getImplName(); + + /** + * Returns the description of this log event listener. + * + * @return String with listener description. + */ + public String getDescription(); + + /** + * Return list of default config parameters for this log event listener. + * + * @return Vector of default parameters. + */ + public Vector<String> getDefaultParams(); + + /** + * Return list of instance config parameters for this log event listener. + * + * @return Vector of instance parameters. + */ + public Vector<String> getInstanceParams(); +} |