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