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 * Portions Copyright 2013-2014 ForgeRock AS. 015 */ 016package org.opends.server.loggers; 017 018import java.util.List; 019 020import org.forgerock.i18n.LocalizableMessage; 021import org.opends.server.admin.std.server.HTTPAccessLogPublisherCfg; 022 023/** 024 * This class defines the set of methods and structures that must be implemented 025 * for a Directory Server HTTP access log publisher. 026 * 027 * @param <T> 028 * The type of HTTP access log publisher configuration handled by this 029 * log publisher implementation. 030 */ 031@org.opends.server.types.PublicAPI( 032 stability = org.opends.server.types.StabilityLevel.VOLATILE, 033 mayInstantiate = false, 034 mayExtend = true, 035 mayInvoke = false) 036public abstract class HTTPAccessLogPublisher 037 <T extends HTTPAccessLogPublisherCfg> implements LogPublisher<T> 038{ 039 040 /** {@inheritDoc} */ 041 @Override 042 public boolean isConfigurationAcceptable(T configuration, 043 List<LocalizableMessage> unacceptableReasons) 044 { 045 // This default implementation does not perform any special 046 // validation. It should be overridden by HTTP access log publisher 047 // implementations that wish to perform more detailed validation. 048 return true; 049 } 050 051 /** 052 * Logs the request info according to the configured extended log format. 053 * 054 * @param requestInfo 055 * The request info to log 056 * @see <a href="http://www.w3.org/TR/WD-logfile.html">W3C's Extended Log File 057 * Format</a> 058 * @see <a href= 059 * "http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/ 060 * Library/IIS/676400bc-8969-4aa7-851a-9319490a9bbb.mspx?mfr=true"> 061 * Microsoft's W3C Extended Log File Format (IIS 6.0)</a> 062 */ 063 public void logRequestInfo(HTTPRequestInfo requestInfo) 064 { 065 // Do nothing 066 } 067 068}