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
010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 * Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 * Copyright 2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.admin.std.client;
028
029
030
031 import java.util.Collection;
032 import java.util.SortedSet;
033 import org.opends.server.admin.IllegalPropertyValueException;
034 import org.opends.server.admin.ManagedObjectDefinition;
035 import org.opends.server.admin.std.server.FileBasedErrorLogPublisherCfg;
036
037
038
039 /**
040 * A client-side interface for reading and modifying File Based Error
041 * Log Publisher settings.
042 * <p>
043 * File Based Error Log Publishers publish error messages to the file
044 * system.
045 */
046 public interface FileBasedErrorLogPublisherCfgClient extends ErrorLogPublisherCfgClient {
047
048 /**
049 * Get the configuration definition associated with this File Based Error Log Publisher.
050 *
051 * @return Returns the configuration definition associated with this File Based Error Log Publisher.
052 */
053 ManagedObjectDefinition<? extends FileBasedErrorLogPublisherCfgClient, ? extends FileBasedErrorLogPublisherCfg> 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 IllegalPropertyValueException
075 * If the new value is invalid.
076 */
077 void setAppend(Boolean value) throws IllegalPropertyValueException;
078
079
080
081 /**
082 * Gets the "asynchronous" property.
083 * <p>
084 * Indicates whether the File Based Error Log Publisher will publish
085 * 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 Error Log Publisher will publish
097 * records asynchronously.
098 *
099 * @param value The value of the "asynchronous" property.
100 * @throws IllegalPropertyValueException
101 * If the new value is invalid.
102 */
103 void setAsynchronous(boolean value) throws IllegalPropertyValueException;
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 will be
113 * flushed 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 will be
127 * flushed after all the log records in the queue are written.
128 *
129 * @param value The value of the "auto-flush" property.
130 * @throws IllegalPropertyValueException
131 * If the new value is invalid.
132 */
133 void setAutoFlush(Boolean value) throws IllegalPropertyValueException;
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 IllegalPropertyValueException
155 * If the new value is invalid.
156 */
157 void setBufferSize(Long value) throws IllegalPropertyValueException;
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 Error 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 Error Log Publisher implementation.
178 *
179 * @param value The value of the "java-class" property.
180 * @throws IllegalPropertyValueException
181 * If the new value is invalid.
182 */
183 void setJavaClass(String value) throws IllegalPropertyValueException;
184
185
186
187 /**
188 * Gets the "log-file" property.
189 * <p>
190 * The file name to use for the log files generated by the File
191 * Based Error Log Publisher .
192 * <p>
193 * The path to the file is relative to the server root.
194 *
195 * @return Returns the value of the "log-file" property.
196 */
197 String getLogFile();
198
199
200
201 /**
202 * Sets the "log-file" property.
203 * <p>
204 * The file name to use for the log files generated by the File
205 * Based Error Log Publisher .
206 * <p>
207 * The path to the file is relative to the server root.
208 *
209 * @param value The value of the "log-file" property.
210 * @throws IllegalPropertyValueException
211 * If the new value is invalid.
212 */
213 void setLogFile(String value) throws IllegalPropertyValueException;
214
215
216
217 /**
218 * Gets the "log-file-permissions" property.
219 * <p>
220 * The UNIX permissions of the log files created by this File Based
221 * Error Log Publisher .
222 *
223 * @return Returns the value of the "log-file-permissions" property.
224 */
225 String getLogFilePermissions();
226
227
228
229 /**
230 * Sets the "log-file-permissions" property.
231 * <p>
232 * The UNIX permissions of the log files created by this File Based
233 * Error Log Publisher .
234 *
235 * @param value The value of the "log-file-permissions" property.
236 * @throws IllegalPropertyValueException
237 * If the new value is invalid.
238 */
239 void setLogFilePermissions(String value) throws IllegalPropertyValueException;
240
241
242
243 /**
244 * Gets the "queue-size" property.
245 * <p>
246 * The maximum number of log records that can be stored in the
247 * asynchronous queue.
248 *
249 * @return Returns the value of the "queue-size" property.
250 */
251 int getQueueSize();
252
253
254
255 /**
256 * Sets the "queue-size" property.
257 * <p>
258 * The maximum number of log records that can be stored in the
259 * asynchronous queue.
260 *
261 * @param value The value of the "queue-size" property.
262 * @throws IllegalPropertyValueException
263 * If the new value is invalid.
264 */
265 void setQueueSize(Integer value) throws IllegalPropertyValueException;
266
267
268
269 /**
270 * Gets the "retention-policy" property.
271 * <p>
272 * The retention policy to use for the File Based Error Log
273 * Publisher .
274 * <p>
275 * When multiple policies are used, log files will be cleaned when
276 * any of the policy's conditions are met.
277 *
278 * @return Returns the values of the "retention-policy" property.
279 */
280 SortedSet<String> getRetentionPolicy();
281
282
283
284 /**
285 * Sets the "retention-policy" property.
286 * <p>
287 * The retention policy to use for the File Based Error Log
288 * Publisher .
289 * <p>
290 * When multiple policies are used, log files will be cleaned when
291 * any of the policy's conditions are met.
292 *
293 * @param values The values of the "retention-policy" property.
294 * @throws IllegalPropertyValueException
295 * If one or more of the new values are invalid.
296 */
297 void setRetentionPolicy(Collection<String> values) throws IllegalPropertyValueException;
298
299
300
301 /**
302 * Gets the "rotation-policy" property.
303 * <p>
304 * The rotation policy to use for the File Based Error Log Publisher
305 * .
306 * <p>
307 * When multiple policies are used, rotation will occur if any
308 * policy's conditions are met.
309 *
310 * @return Returns the values of the "rotation-policy" property.
311 */
312 SortedSet<String> getRotationPolicy();
313
314
315
316 /**
317 * Sets the "rotation-policy" property.
318 * <p>
319 * The rotation policy to use for the File Based Error Log Publisher
320 * .
321 * <p>
322 * When multiple policies are used, rotation will occur if any
323 * policy's conditions are met.
324 *
325 * @param values The values of the "rotation-policy" property.
326 * @throws IllegalPropertyValueException
327 * If one or more of the new values are invalid.
328 */
329 void setRotationPolicy(Collection<String> values) throws IllegalPropertyValueException;
330
331
332
333 /**
334 * Gets the "time-interval" property.
335 * <p>
336 * Specifies the interval at which to check whether the log files
337 * need to be rotated.
338 *
339 * @return Returns the value of the "time-interval" property.
340 */
341 long getTimeInterval();
342
343
344
345 /**
346 * Sets the "time-interval" property.
347 * <p>
348 * Specifies the interval at which to check whether the log files
349 * need to be rotated.
350 *
351 * @param value The value of the "time-interval" property.
352 * @throws IllegalPropertyValueException
353 * If the new value is invalid.
354 */
355 void setTimeInterval(Long value) throws IllegalPropertyValueException;
356
357 }