001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2008 Sun Microsystems, Inc. 015 */ 016package org.forgerock.opendj.server.config.server; 017 018 019 020import java.util.SortedSet; 021import org.forgerock.opendj.config.server.ConfigurationChangeListener; 022import org.forgerock.opendj.ldap.DN; 023 024 025 026/** 027 * A server-side interface for querying File Based Debug Log Publisher 028 * settings. 029 * <p> 030 * File Based Debug Log Publishers publish debug messages to the file 031 * system. 032 */ 033public interface FileBasedDebugLogPublisherCfg extends DebugLogPublisherCfg { 034 035 /** 036 * Gets the configuration class associated with this File Based Debug Log Publisher. 037 * 038 * @return Returns the configuration class associated with this File Based Debug Log Publisher. 039 */ 040 Class<? extends FileBasedDebugLogPublisherCfg> configurationClass(); 041 042 043 044 /** 045 * Register to be notified when this File Based Debug Log Publisher is changed. 046 * 047 * @param listener 048 * The File Based Debug Log Publisher configuration change listener. 049 */ 050 void addFileBasedDebugChangeListener(ConfigurationChangeListener<FileBasedDebugLogPublisherCfg> listener); 051 052 053 054 /** 055 * Deregister an existing File Based Debug Log Publisher configuration change listener. 056 * 057 * @param listener 058 * The File Based Debug Log Publisher configuration change listener. 059 */ 060 void removeFileBasedDebugChangeListener(ConfigurationChangeListener<FileBasedDebugLogPublisherCfg> listener); 061 062 063 064 /** 065 * Gets the "append" property. 066 * <p> 067 * Specifies whether to append to existing log files. 068 * 069 * @return Returns the value of the "append" property. 070 */ 071 boolean isAppend(); 072 073 074 075 /** 076 * Gets the "asynchronous" property. 077 * <p> 078 * Indicates whether the File Based Debug Log Publisher will publish 079 * records asynchronously. 080 * 081 * @return Returns the value of the "asynchronous" property. 082 */ 083 boolean isAsynchronous(); 084 085 086 087 /** 088 * Gets the "auto-flush" property. 089 * <p> 090 * Specifies whether to flush the writer after every log record. 091 * <p> 092 * If the asynchronous writes option is used, the writer is flushed 093 * after all the log records in the queue are written. 094 * 095 * @return Returns the value of the "auto-flush" property. 096 */ 097 boolean isAutoFlush(); 098 099 100 101 /** 102 * Gets the "buffer-size" property. 103 * <p> 104 * Specifies the log file buffer size. 105 * 106 * @return Returns the value of the "buffer-size" property. 107 */ 108 long getBufferSize(); 109 110 111 112 /** 113 * Gets the "java-class" property. 114 * <p> 115 * The fully-qualified name of the Java class that provides the File 116 * Based Debug Log Publisher implementation. 117 * 118 * @return Returns the value of the "java-class" property. 119 */ 120 String getJavaClass(); 121 122 123 124 /** 125 * Gets the "log-file" property. 126 * <p> 127 * The file name to use for the log files generated by the File 128 * Based Debug Log Publisher . 129 * <p> 130 * The path to the file is relative to the server root. 131 * 132 * @return Returns the value of the "log-file" property. 133 */ 134 String getLogFile(); 135 136 137 138 /** 139 * Gets the "log-file-permissions" property. 140 * <p> 141 * The UNIX permissions of the log files created by this File Based 142 * Debug Log Publisher . 143 * 144 * @return Returns the value of the "log-file-permissions" property. 145 */ 146 String getLogFilePermissions(); 147 148 149 150 /** 151 * Gets the "queue-size" property. 152 * <p> 153 * The maximum number of log records that can be stored in the 154 * asynchronous queue. 155 * 156 * @return Returns the value of the "queue-size" property. 157 */ 158 int getQueueSize(); 159 160 161 162 /** 163 * Gets the "retention-policy" property. 164 * <p> 165 * The retention policy to use for the File Based Debug Log 166 * Publisher . 167 * <p> 168 * When multiple policies are used, log files are cleaned when any 169 * of the policy's conditions are met. 170 * 171 * @return Returns an unmodifiable set containing the values of the "retention-policy" property. 172 */ 173 SortedSet<String> getRetentionPolicy(); 174 175 176 177 /** 178 * Gets the "retention-policy" property as a set of DNs. 179 * <p> 180 * The retention policy to use for the File Based Debug Log 181 * Publisher . 182 * <p> 183 * When multiple policies are used, log files are cleaned when any 184 * of the policy's conditions are met. 185 * 186 * @return Returns the DN values of the "retention-policy" property. 187 */ 188 SortedSet<DN> getRetentionPolicyDNs(); 189 190 191 192 /** 193 * Gets the "rotation-policy" property. 194 * <p> 195 * The rotation policy to use for the File Based Debug Log Publisher 196 * . 197 * <p> 198 * When multiple policies are used, rotation will occur if any 199 * policy's conditions are met. 200 * 201 * @return Returns an unmodifiable set containing the values of the "rotation-policy" property. 202 */ 203 SortedSet<String> getRotationPolicy(); 204 205 206 207 /** 208 * Gets the "rotation-policy" property as a set of DNs. 209 * <p> 210 * The rotation policy to use for the File Based Debug Log Publisher 211 * . 212 * <p> 213 * When multiple policies are used, rotation will occur if any 214 * policy's conditions are met. 215 * 216 * @return Returns the DN values of the "rotation-policy" property. 217 */ 218 SortedSet<DN> getRotationPolicyDNs(); 219 220 221 222 /** 223 * Gets the "time-interval" property. 224 * <p> 225 * Specifies the interval at which to check whether the log files 226 * need to be rotated. 227 * 228 * @return Returns the value of the "time-interval" property. 229 */ 230 long getTimeInterval(); 231 232}