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