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