| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.loggers; |
| | | import org.opends.messages.Message; |
| | |
| | | |
| | | // The set of access loggers that have been registered with the server. It |
| | | // will initially be empty. |
| | | static CopyOnWriteArrayList<AccessLogPublisher<?>> accessPublishers = |
| | | private static CopyOnWriteArrayList<AccessLogPublisher<?>> accessPublishers = |
| | | new CopyOnWriteArrayList<AccessLogPublisher<?>>(); |
| | | |
| | | // The singleton instance of this class for configuration purposes. |
| | | static final AccessLogger instance = new AccessLogger(); |
| | | private static final AccessLogger instance = new AccessLogger(); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * Writes a message to the access logger containing additional |
| | | * information associated with the provided client connection. |
| | | * |
| | | * @param clientConnection |
| | | * The client connection that has been established. |
| | | * @param category |
| | | * The category of the intermediate message. |
| | | * @param content |
| | | * The content of the intermediate message. This comprises of |
| | | * one or more key/value pairs which form the content of the |
| | | * intermediate message. |
| | | */ |
| | | public static void logConnectIntermediateMessage( |
| | | ClientConnection clientConnection, String category, |
| | | Map<String, String> content) |
| | | { |
| | | for (AccessLogPublisher<?> publisher : accessPublishers) |
| | | { |
| | | publisher.logConnectIntermediateMessage(clientConnection, |
| | | category, content); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Writes a message to the access logger with information about the |
| | | * termination of an existing client connection. |
| | | * |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Writes a message to the access logger containing additional |
| | | * information associated with the provided client disconnection. |
| | | * |
| | | * @param clientConnection |
| | | * The client connection that has been terminated. |
| | | * @param category |
| | | * The category of the intermediate message. |
| | | * @param content |
| | | * The content of the intermediate message. This comprises of |
| | | * one or more key/value pairs which form the content of the |
| | | * intermediate message. |
| | | */ |
| | | public static void logDisconnectIntermediateMessage( |
| | | ClientConnection clientConnection, String category, |
| | | Map<String, String> content) |
| | | { |
| | | for (AccessLogPublisher<?> publisher : accessPublishers) |
| | | { |
| | | publisher.logDisconnectIntermediateMessage(clientConnection, |
| | | category, content); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Writes a message to the access logger with information about the abandon |
| | | * request associated with the provided abandon operation. |