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