001/* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt 010 * or http://forgerock.org/license/CDDLv1.0.html. 011 * See the License for the specific language governing permissions 012 * and limitations under the License. 013 * 014 * When distributing Covered Code, include this CDDL HEADER in each 015 * file and include the License file at legal-notices/CDDLv1_0.txt. 016 * If applicable, add the following below this CDDL HEADER, with the 017 * fields enclosed by brackets "[]" replaced with your own identifying 018 * information: 019 * Portions Copyright [yyyy] [name of copyright owner] 020 * 021 * CDDL HEADER END 022 * 023 * 024 * Copyright 2008 Sun Microsystems, Inc. 025 */ 026package org.opends.server.admin.std.server; 027 028 029 030import java.util.SortedSet; 031import org.opends.server.admin.server.ConfigurationChangeListener; 032import org.opends.server.admin.std.meta.ErrorLogPublisherCfgDefn.DefaultSeverity; 033 034 035 036/** 037 * A server-side interface for querying Error Log Publisher settings. 038 * <p> 039 * Error Log Publishers are responsible for distributing error log 040 * messages from the error logger to a destination. 041 */ 042public interface ErrorLogPublisherCfg extends LogPublisherCfg { 043 044 /** 045 * Gets the configuration class associated with this Error Log Publisher. 046 * 047 * @return Returns the configuration class associated with this Error Log Publisher. 048 */ 049 Class<? extends ErrorLogPublisherCfg> configurationClass(); 050 051 052 053 /** 054 * Register to be notified when this Error Log Publisher is changed. 055 * 056 * @param listener 057 * The Error Log Publisher configuration change listener. 058 */ 059 void addErrorChangeListener(ConfigurationChangeListener<ErrorLogPublisherCfg> listener); 060 061 062 063 /** 064 * Deregister an existing Error Log Publisher configuration change listener. 065 * 066 * @param listener 067 * The Error Log Publisher configuration change listener. 068 */ 069 void removeErrorChangeListener(ConfigurationChangeListener<ErrorLogPublisherCfg> listener); 070 071 072 073 /** 074 * Gets the "default-severity" property. 075 * <p> 076 * Specifies the default severity levels for the logger. 077 * 078 * @return Returns an unmodifiable set containing the values of the "default-severity" property. 079 */ 080 SortedSet<DefaultSeverity> getDefaultSeverity(); 081 082 083 084 /** 085 * Gets the "java-class" property. 086 * <p> 087 * The fully-qualified name of the Java class that provides the 088 * Error Log Publisher implementation. 089 * 090 * @return Returns the value of the "java-class" property. 091 */ 092 String getJavaClass(); 093 094 095 096 /** 097 * Gets the "override-severity" property. 098 * <p> 099 * Specifies the override severity levels for the logger based on 100 * the category of the messages. 101 * <p> 102 * Each override severity level should include the category and the 103 * severity levels to log for that category, for example, 104 * core=error,info,warning. Valid categories are: core, extensions, 105 * protocol, config, log, util, schema, plugin, jeb, backend, tools, 106 * task, access-control, admin, sync, version, quicksetup, 107 * admin-tool, dsconfig, user-defined. Valid severities are: all, 108 * error, info, warning, notice, debug. 109 * 110 * @return Returns an unmodifiable set containing the values of the "override-severity" property. 111 */ 112 SortedSet<String> getOverrideSeverity(); 113 114}