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.client; 027 028 029 030import java.util.Collection; 031import java.util.SortedSet; 032import org.opends.server.admin.ManagedObjectDefinition; 033import org.opends.server.admin.PropertyException; 034import org.opends.server.admin.std.server.FileBasedHTTPAccessLogPublisherCfg; 035 036 037 038/** 039 * A client-side interface for reading and modifying File Based HTTP 040 * Access Log Publisher settings. 041 * <p> 042 * File Based HTTP Access Log Publishers publish HTTP access messages 043 * to the file system. 044 */ 045public interface FileBasedHTTPAccessLogPublisherCfgClient extends HTTPAccessLogPublisherCfgClient { 046 047 /** 048 * Get the configuration definition associated with this File Based HTTP Access Log Publisher. 049 * 050 * @return Returns the configuration definition associated with this File Based HTTP Access Log Publisher. 051 */ 052 ManagedObjectDefinition<? extends FileBasedHTTPAccessLogPublisherCfgClient, ? extends FileBasedHTTPAccessLogPublisherCfg> definition(); 053 054 055 056 /** 057 * Gets the "append" property. 058 * <p> 059 * Specifies whether to append to existing log files. 060 * 061 * @return Returns the value of the "append" property. 062 */ 063 boolean isAppend(); 064 065 066 067 /** 068 * Sets the "append" property. 069 * <p> 070 * Specifies whether to append to existing log files. 071 * 072 * @param value The value of the "append" property. 073 * @throws PropertyException 074 * If the new value is invalid. 075 */ 076 void setAppend(Boolean value) throws PropertyException; 077 078 079 080 /** 081 * Gets the "asynchronous" property. 082 * <p> 083 * Indicates whether the File Based HTTP Access Log Publisher will 084 * publish records asynchronously. 085 * 086 * @return Returns the value of the "asynchronous" property. 087 */ 088 boolean isAsynchronous(); 089 090 091 092 /** 093 * Sets the "asynchronous" property. 094 * <p> 095 * Indicates whether the File Based HTTP Access Log Publisher will 096 * publish records asynchronously. 097 * 098 * @param value The value of the "asynchronous" property. 099 * @throws PropertyException 100 * If the new value is invalid. 101 */ 102 void setAsynchronous(boolean value) throws PropertyException; 103 104 105 106 /** 107 * Gets the "auto-flush" property. 108 * <p> 109 * Specifies whether to flush the writer after every log record. 110 * <p> 111 * If the asynchronous writes option is used, the writer is flushed 112 * after all the log records in the queue are written. 113 * 114 * @return Returns the value of the "auto-flush" property. 115 */ 116 boolean isAutoFlush(); 117 118 119 120 /** 121 * Sets the "auto-flush" property. 122 * <p> 123 * Specifies whether to flush the writer after every log record. 124 * <p> 125 * If the asynchronous writes option is used, the writer is flushed 126 * after all the log records in the queue are written. 127 * 128 * @param value The value of the "auto-flush" property. 129 * @throws PropertyException 130 * If the new value is invalid. 131 */ 132 void setAutoFlush(Boolean value) throws PropertyException; 133 134 135 136 /** 137 * Gets the "buffer-size" property. 138 * <p> 139 * Specifies the log file buffer size. 140 * 141 * @return Returns the value of the "buffer-size" property. 142 */ 143 long getBufferSize(); 144 145 146 147 /** 148 * Sets the "buffer-size" property. 149 * <p> 150 * Specifies the log file buffer size. 151 * 152 * @param value The value of the "buffer-size" property. 153 * @throws PropertyException 154 * If the new value is invalid. 155 */ 156 void setBufferSize(Long value) throws PropertyException; 157 158 159 160 /** 161 * Gets the "java-class" property. 162 * <p> 163 * The fully-qualified name of the Java class that provides the File 164 * Based HTTP Access Log Publisher implementation. 165 * 166 * @return Returns the value of the "java-class" property. 167 */ 168 String getJavaClass(); 169 170 171 172 /** 173 * Sets the "java-class" property. 174 * <p> 175 * The fully-qualified name of the Java class that provides the File 176 * Based HTTP Access Log Publisher implementation. 177 * 178 * @param value The value of the "java-class" property. 179 * @throws PropertyException 180 * If the new value is invalid. 181 */ 182 void setJavaClass(String value) throws PropertyException; 183 184 185 186 /** 187 * Gets the "log-file" property. 188 * <p> 189 * The file name to use for the log files generated by the File 190 * Based HTTP Access Log Publisher. The path to the file is relative 191 * to the server root. 192 * 193 * @return Returns the value of the "log-file" property. 194 */ 195 String getLogFile(); 196 197 198 199 /** 200 * Sets the "log-file" property. 201 * <p> 202 * The file name to use for the log files generated by the File 203 * Based HTTP Access Log Publisher. The path to the file is relative 204 * to the server root. 205 * 206 * @param value The value of the "log-file" property. 207 * @throws PropertyException 208 * If the new value is invalid. 209 */ 210 void setLogFile(String value) throws PropertyException; 211 212 213 214 /** 215 * Gets the "log-file-permissions" property. 216 * <p> 217 * The UNIX permissions of the log files created by this File Based 218 * HTTP Access Log Publisher. 219 * 220 * @return Returns the value of the "log-file-permissions" property. 221 */ 222 String getLogFilePermissions(); 223 224 225 226 /** 227 * Sets the "log-file-permissions" property. 228 * <p> 229 * The UNIX permissions of the log files created by this File Based 230 * HTTP Access Log Publisher. 231 * 232 * @param value The value of the "log-file-permissions" property. 233 * @throws PropertyException 234 * If the new value is invalid. 235 */ 236 void setLogFilePermissions(String value) throws PropertyException; 237 238 239 240 /** 241 * Gets the "log-format" property. 242 * <p> 243 * Specifies how log records should be formatted and written to the 244 * HTTP access log. 245 * 246 * @return Returns the value of the "log-format" property. 247 */ 248 String getLogFormat(); 249 250 251 252 /** 253 * Sets the "log-format" property. 254 * <p> 255 * Specifies how log records should be formatted and written to the 256 * HTTP access log. 257 * 258 * @param value The value of the "log-format" property. 259 * @throws PropertyException 260 * If the new value is invalid. 261 */ 262 void setLogFormat(String value) throws PropertyException; 263 264 265 266 /** 267 * Gets the "log-record-time-format" property. 268 * <p> 269 * Specifies the format string that is used to generate log record 270 * timestamps. 271 * 272 * @return Returns the value of the "log-record-time-format" property. 273 */ 274 String getLogRecordTimeFormat(); 275 276 277 278 /** 279 * Sets the "log-record-time-format" property. 280 * <p> 281 * Specifies the format string that is used to generate log record 282 * timestamps. 283 * 284 * @param value The value of the "log-record-time-format" property. 285 * @throws PropertyException 286 * If the new value is invalid. 287 */ 288 void setLogRecordTimeFormat(String value) throws PropertyException; 289 290 291 292 /** 293 * Gets the "queue-size" property. 294 * <p> 295 * The maximum number of log records that can be stored in the 296 * asynchronous queue. 297 * <p> 298 * Setting the queue size to zero activates parallel log writer 299 * implementation which has no queue size limit and as such the 300 * parallel log writer should only be used on a very well tuned 301 * server configuration to avoid potential out of memory errors. 302 * 303 * @return Returns the value of the "queue-size" property. 304 */ 305 int getQueueSize(); 306 307 308 309 /** 310 * Sets the "queue-size" property. 311 * <p> 312 * The maximum number of log records that can be stored in the 313 * asynchronous queue. 314 * <p> 315 * Setting the queue size to zero activates parallel log writer 316 * implementation which has no queue size limit and as such the 317 * parallel log writer should only be used on a very well tuned 318 * server configuration to avoid potential out of memory errors. 319 * 320 * @param value The value of the "queue-size" property. 321 * @throws PropertyException 322 * If the new value is invalid. 323 */ 324 void setQueueSize(Integer value) throws PropertyException; 325 326 327 328 /** 329 * Gets the "retention-policy" property. 330 * <p> 331 * The retention policy to use for the File Based HTTP Access Log 332 * Publisher . 333 * <p> 334 * When multiple policies are used, log files are cleaned when any 335 * of the policy's conditions are met. 336 * 337 * @return Returns the values of the "retention-policy" property. 338 */ 339 SortedSet<String> getRetentionPolicy(); 340 341 342 343 /** 344 * Sets the "retention-policy" property. 345 * <p> 346 * The retention policy to use for the File Based HTTP Access Log 347 * Publisher . 348 * <p> 349 * When multiple policies are used, log files are cleaned when any 350 * of the policy's conditions are met. 351 * 352 * @param values The values of the "retention-policy" property. 353 * @throws PropertyException 354 * If one or more of the new values are invalid. 355 */ 356 void setRetentionPolicy(Collection<String> values) throws PropertyException; 357 358 359 360 /** 361 * Gets the "rotation-policy" property. 362 * <p> 363 * The rotation policy to use for the File Based HTTP Access Log 364 * Publisher . 365 * <p> 366 * When multiple policies are used, rotation will occur if any 367 * policy's conditions are met. 368 * 369 * @return Returns the values of the "rotation-policy" property. 370 */ 371 SortedSet<String> getRotationPolicy(); 372 373 374 375 /** 376 * Sets the "rotation-policy" property. 377 * <p> 378 * The rotation policy to use for the File Based HTTP Access Log 379 * Publisher . 380 * <p> 381 * When multiple policies are used, rotation will occur if any 382 * policy's conditions are met. 383 * 384 * @param values The values of the "rotation-policy" property. 385 * @throws PropertyException 386 * If one or more of the new values are invalid. 387 */ 388 void setRotationPolicy(Collection<String> values) throws PropertyException; 389 390 391 392 /** 393 * Gets the "time-interval" property. 394 * <p> 395 * Specifies the interval at which to check whether the log files 396 * need to be rotated. 397 * 398 * @return Returns the value of the "time-interval" property. 399 */ 400 long getTimeInterval(); 401 402 403 404 /** 405 * Sets the "time-interval" property. 406 * <p> 407 * Specifies the interval at which to check whether the log files 408 * need to be rotated. 409 * 410 * @param value The value of the "time-interval" property. 411 * @throws PropertyException 412 * If the new value is invalid. 413 */ 414 void setTimeInterval(Long value) throws PropertyException; 415 416}