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.client; 017 018 019 020import java.util.Collection; 021import java.util.SortedSet; 022import org.forgerock.opendj.config.ManagedObjectDefinition; 023import org.forgerock.opendj.config.PropertyException; 024import org.forgerock.opendj.server.config.server.FileBasedDebugLogPublisherCfg; 025 026 027 028/** 029 * A client-side interface for reading and modifying File Based Debug 030 * Log Publisher settings. 031 * <p> 032 * File Based Debug Log Publishers publish debug messages to the file 033 * system. 034 */ 035public interface FileBasedDebugLogPublisherCfgClient extends DebugLogPublisherCfgClient { 036 037 /** 038 * Get the configuration definition associated with this File Based Debug Log Publisher. 039 * 040 * @return Returns the configuration definition associated with this File Based Debug Log Publisher. 041 */ 042 ManagedObjectDefinition<? extends FileBasedDebugLogPublisherCfgClient, ? extends FileBasedDebugLogPublisherCfg> definition(); 043 044 045 046 /** 047 * Gets the "append" property. 048 * <p> 049 * Specifies whether to append to existing log files. 050 * 051 * @return Returns the value of the "append" property. 052 */ 053 boolean isAppend(); 054 055 056 057 /** 058 * Sets the "append" property. 059 * <p> 060 * Specifies whether to append to existing log files. 061 * 062 * @param value The value of the "append" property. 063 * @throws PropertyException 064 * If the new value is invalid. 065 */ 066 void setAppend(Boolean value) throws PropertyException; 067 068 069 070 /** 071 * Gets the "asynchronous" property. 072 * <p> 073 * Indicates whether the File Based Debug Log Publisher will publish 074 * records asynchronously. 075 * 076 * @return Returns the value of the "asynchronous" property. 077 */ 078 boolean isAsynchronous(); 079 080 081 082 /** 083 * Sets the "asynchronous" property. 084 * <p> 085 * Indicates whether the File Based Debug Log Publisher will publish 086 * records asynchronously. 087 * 088 * @param value The value of the "asynchronous" property. 089 * @throws PropertyException 090 * If the new value is invalid. 091 */ 092 void setAsynchronous(boolean value) throws PropertyException; 093 094 095 096 /** 097 * Gets the "auto-flush" property. 098 * <p> 099 * Specifies whether to flush the writer after every log record. 100 * <p> 101 * If the asynchronous writes option is used, the writer is flushed 102 * after all the log records in the queue are written. 103 * 104 * @return Returns the value of the "auto-flush" property. 105 */ 106 boolean isAutoFlush(); 107 108 109 110 /** 111 * Sets the "auto-flush" property. 112 * <p> 113 * Specifies whether to flush the writer after every log record. 114 * <p> 115 * If the asynchronous writes option is used, the writer is flushed 116 * after all the log records in the queue are written. 117 * 118 * @param value The value of the "auto-flush" property. 119 * @throws PropertyException 120 * If the new value is invalid. 121 */ 122 void setAutoFlush(Boolean value) throws PropertyException; 123 124 125 126 /** 127 * Gets the "buffer-size" property. 128 * <p> 129 * Specifies the log file buffer size. 130 * 131 * @return Returns the value of the "buffer-size" property. 132 */ 133 long getBufferSize(); 134 135 136 137 /** 138 * Sets the "buffer-size" property. 139 * <p> 140 * Specifies the log file buffer size. 141 * 142 * @param value The value of the "buffer-size" property. 143 * @throws PropertyException 144 * If the new value is invalid. 145 */ 146 void setBufferSize(Long value) throws PropertyException; 147 148 149 150 /** 151 * Gets the "java-class" property. 152 * <p> 153 * The fully-qualified name of the Java class that provides the File 154 * Based Debug Log Publisher implementation. 155 * 156 * @return Returns the value of the "java-class" property. 157 */ 158 String getJavaClass(); 159 160 161 162 /** 163 * Sets the "java-class" property. 164 * <p> 165 * The fully-qualified name of the Java class that provides the File 166 * Based Debug Log Publisher implementation. 167 * 168 * @param value The value of the "java-class" property. 169 * @throws PropertyException 170 * If the new value is invalid. 171 */ 172 void setJavaClass(String value) throws PropertyException; 173 174 175 176 /** 177 * Gets the "log-file" property. 178 * <p> 179 * The file name to use for the log files generated by the File 180 * Based Debug Log Publisher . 181 * <p> 182 * The path to the file is relative to the server root. 183 * 184 * @return Returns the value of the "log-file" property. 185 */ 186 String getLogFile(); 187 188 189 190 /** 191 * Sets the "log-file" property. 192 * <p> 193 * The file name to use for the log files generated by the File 194 * Based Debug Log Publisher . 195 * <p> 196 * The path to the file is relative to the server root. 197 * 198 * @param value The value of the "log-file" property. 199 * @throws PropertyException 200 * If the new value is invalid. 201 */ 202 void setLogFile(String value) throws PropertyException; 203 204 205 206 /** 207 * Gets the "log-file-permissions" property. 208 * <p> 209 * The UNIX permissions of the log files created by this File Based 210 * Debug Log Publisher . 211 * 212 * @return Returns the value of the "log-file-permissions" property. 213 */ 214 String getLogFilePermissions(); 215 216 217 218 /** 219 * Sets the "log-file-permissions" property. 220 * <p> 221 * The UNIX permissions of the log files created by this File Based 222 * Debug Log Publisher . 223 * 224 * @param value The value of the "log-file-permissions" property. 225 * @throws PropertyException 226 * If the new value is invalid. 227 */ 228 void setLogFilePermissions(String value) throws PropertyException; 229 230 231 232 /** 233 * Gets the "queue-size" property. 234 * <p> 235 * The maximum number of log records that can be stored in the 236 * asynchronous queue. 237 * 238 * @return Returns the value of the "queue-size" property. 239 */ 240 int getQueueSize(); 241 242 243 244 /** 245 * Sets the "queue-size" property. 246 * <p> 247 * The maximum number of log records that can be stored in the 248 * asynchronous queue. 249 * 250 * @param value The value of the "queue-size" property. 251 * @throws PropertyException 252 * If the new value is invalid. 253 */ 254 void setQueueSize(Integer value) throws PropertyException; 255 256 257 258 /** 259 * Gets the "retention-policy" property. 260 * <p> 261 * The retention policy to use for the File Based Debug Log 262 * Publisher . 263 * <p> 264 * When multiple policies are used, log files are cleaned when any 265 * of the policy's conditions are met. 266 * 267 * @return Returns the values of the "retention-policy" property. 268 */ 269 SortedSet<String> getRetentionPolicy(); 270 271 272 273 /** 274 * Sets the "retention-policy" property. 275 * <p> 276 * The retention policy to use for the File Based Debug Log 277 * Publisher . 278 * <p> 279 * When multiple policies are used, log files are cleaned when any 280 * of the policy's conditions are met. 281 * 282 * @param values The values of the "retention-policy" property. 283 * @throws PropertyException 284 * If one or more of the new values are invalid. 285 */ 286 void setRetentionPolicy(Collection<String> values) throws PropertyException; 287 288 289 290 /** 291 * Gets the "rotation-policy" property. 292 * <p> 293 * The rotation policy to use for the File Based Debug Log Publisher 294 * . 295 * <p> 296 * When multiple policies are used, rotation will occur if any 297 * policy's conditions are met. 298 * 299 * @return Returns the values of the "rotation-policy" property. 300 */ 301 SortedSet<String> getRotationPolicy(); 302 303 304 305 /** 306 * Sets the "rotation-policy" property. 307 * <p> 308 * The rotation policy to use for the File Based Debug Log Publisher 309 * . 310 * <p> 311 * When multiple policies are used, rotation will occur if any 312 * policy's conditions are met. 313 * 314 * @param values The values of the "rotation-policy" property. 315 * @throws PropertyException 316 * If one or more of the new values are invalid. 317 */ 318 void setRotationPolicy(Collection<String> values) throws PropertyException; 319 320 321 322 /** 323 * Gets the "time-interval" property. 324 * <p> 325 * Specifies the interval at which to check whether the log files 326 * need to be rotated. 327 * 328 * @return Returns the value of the "time-interval" property. 329 */ 330 long getTimeInterval(); 331 332 333 334 /** 335 * Sets the "time-interval" property. 336 * <p> 337 * Specifies the interval at which to check whether the log files 338 * need to be rotated. 339 * 340 * @param value The value of the "time-interval" property. 341 * @throws PropertyException 342 * If the new value is invalid. 343 */ 344 void setTimeInterval(Long value) throws PropertyException; 345 346}