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.FileBasedAccessLogPublisherCfgDefn.LogFormat; 033import org.opends.server.types.DN; 034 035 036 037/** 038 * A server-side interface for querying File Based Access Log 039 * Publisher settings. 040 * <p> 041 * File Based Access Log Publishers publish access messages to the 042 * file system. 043 */ 044public interface FileBasedAccessLogPublisherCfg extends AccessLogPublisherCfg { 045 046 /** 047 * Gets the configuration class associated with this File Based Access Log Publisher. 048 * 049 * @return Returns the configuration class associated with this File Based Access Log Publisher. 050 */ 051 Class<? extends FileBasedAccessLogPublisherCfg> configurationClass(); 052 053 054 055 /** 056 * Register to be notified when this File Based Access Log Publisher is changed. 057 * 058 * @param listener 059 * The File Based Access Log Publisher configuration change listener. 060 */ 061 void addFileBasedAccessChangeListener(ConfigurationChangeListener<FileBasedAccessLogPublisherCfg> listener); 062 063 064 065 /** 066 * Deregister an existing File Based Access Log Publisher configuration change listener. 067 * 068 * @param listener 069 * The File Based Access Log Publisher configuration change listener. 070 */ 071 void removeFileBasedAccessChangeListener(ConfigurationChangeListener<FileBasedAccessLogPublisherCfg> listener); 072 073 074 075 /** 076 * Gets the "append" property. 077 * <p> 078 * Specifies whether to append to existing log files. 079 * 080 * @return Returns the value of the "append" property. 081 */ 082 boolean isAppend(); 083 084 085 086 /** 087 * Gets the "asynchronous" property. 088 * <p> 089 * Indicates whether the File Based Access Log Publisher will 090 * publish records asynchronously. 091 * 092 * @return Returns the value of the "asynchronous" property. 093 */ 094 boolean isAsynchronous(); 095 096 097 098 /** 099 * Gets the "auto-flush" property. 100 * <p> 101 * Specifies whether to flush the writer after every log record. 102 * <p> 103 * If the asynchronous writes option is used, the writer is flushed 104 * after all the log records in the queue are written. 105 * 106 * @return Returns the value of the "auto-flush" property. 107 */ 108 boolean isAutoFlush(); 109 110 111 112 /** 113 * Gets the "buffer-size" property. 114 * <p> 115 * Specifies the log file buffer size. 116 * 117 * @return Returns the value of the "buffer-size" property. 118 */ 119 long getBufferSize(); 120 121 122 123 /** 124 * Gets the "java-class" property. 125 * <p> 126 * The fully-qualified name of the Java class that provides the File 127 * Based Access Log Publisher implementation. 128 * 129 * @return Returns the value of the "java-class" property. 130 */ 131 String getJavaClass(); 132 133 134 135 /** 136 * Gets the "log-control-oids" property. 137 * <p> 138 * Specifies whether control OIDs will be included in operation log 139 * records. 140 * 141 * @return Returns the value of the "log-control-oids" property. 142 */ 143 boolean isLogControlOids(); 144 145 146 147 /** 148 * Gets the "log-file" property. 149 * <p> 150 * The file name to use for the log files generated by the File 151 * Based Access Log Publisher. The path to the file is relative to 152 * the server root. 153 * 154 * @return Returns the value of the "log-file" property. 155 */ 156 String getLogFile(); 157 158 159 160 /** 161 * Gets the "log-file-permissions" property. 162 * <p> 163 * The UNIX permissions of the log files created by this File Based 164 * Access Log Publisher. 165 * 166 * @return Returns the value of the "log-file-permissions" property. 167 */ 168 String getLogFilePermissions(); 169 170 171 172 /** 173 * Gets the "log-format" property. 174 * <p> 175 * Specifies how log records should be formatted and written to the 176 * access log. 177 * 178 * @return Returns the value of the "log-format" property. 179 */ 180 LogFormat getLogFormat(); 181 182 183 184 /** 185 * Gets the "log-record-time-format" property. 186 * <p> 187 * Specifies the format string that is used to generate log record 188 * timestamps. 189 * 190 * @return Returns the value of the "log-record-time-format" property. 191 */ 192 String getLogRecordTimeFormat(); 193 194 195 196 /** 197 * Gets the "queue-size" property. 198 * <p> 199 * The maximum number of log records that can be stored in the 200 * asynchronous queue. 201 * <p> 202 * Setting the queue size to zero activates parallel log writer 203 * implementation which has no queue size limit and as such the 204 * parallel log writer should only be used on a very well tuned 205 * server configuration to avoid potential out of memory errors. 206 * 207 * @return Returns the value of the "queue-size" property. 208 */ 209 int getQueueSize(); 210 211 212 213 /** 214 * Gets the "retention-policy" property. 215 * <p> 216 * The retention policy to use for the File Based Access Log 217 * Publisher . 218 * <p> 219 * When multiple policies are used, log files are cleaned when any 220 * of the policy's conditions are met. 221 * 222 * @return Returns an unmodifiable set containing the values of the "retention-policy" property. 223 */ 224 SortedSet<String> getRetentionPolicy(); 225 226 227 228 /** 229 * Gets the "retention-policy" property as a set of DNs. 230 * <p> 231 * The retention policy to use for the File Based Access Log 232 * Publisher . 233 * <p> 234 * When multiple policies are used, log files are cleaned when any 235 * of the policy's conditions are met. 236 * 237 * @return Returns the DN values of the "retention-policy" property. 238 */ 239 SortedSet<DN> getRetentionPolicyDNs(); 240 241 242 243 /** 244 * Gets the "rotation-policy" property. 245 * <p> 246 * The rotation policy to use for the File Based Access Log 247 * Publisher . 248 * <p> 249 * When multiple policies are used, rotation will occur if any 250 * policy's conditions are met. 251 * 252 * @return Returns an unmodifiable set containing the values of the "rotation-policy" property. 253 */ 254 SortedSet<String> getRotationPolicy(); 255 256 257 258 /** 259 * Gets the "rotation-policy" property as a set of DNs. 260 * <p> 261 * The rotation policy to use for the File Based Access Log 262 * Publisher . 263 * <p> 264 * When multiple policies are used, rotation will occur if any 265 * policy's conditions are met. 266 * 267 * @return Returns the DN values of the "rotation-policy" property. 268 */ 269 SortedSet<DN> getRotationPolicyDNs(); 270 271 272 273 /** 274 * Gets the "time-interval" property. 275 * <p> 276 * Specifies the interval at which to check whether the log files 277 * need to be rotated. 278 * 279 * @return Returns the value of the "time-interval" property. 280 */ 281 long getTimeInterval(); 282 283}