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 2014-2015 ForgeRock AS. 015 */ 016 017package org.forgerock.openig.audit; 018 019/** 020 * An AuditSystem is an OpenIG service that helps to decouple {@link AuditEvent} producers and consumers. 021 * The AuditSystem is the primary target for audit notifications generated by decorated heap objects, it can then 022 * pre-process them before forwarding them to registered agents ({@link AuditEventListener}). 023 * <p> 024 * Concrete {@link AuditSystem} implementations could: 025 * <ul> 026 * <li>Persist the notifications</li> 027 * <li>Call agents in an asynchronous way (limit the latency in request processing, but consume more CPU)</li> 028 * <li>Pre-filter the notifications</li> 029 * </ul> 030 */ 031@Deprecated 032public interface AuditSystem extends AuditEventListener { 033 /** 034 * Registers an event listener into this audit system. 035 * Once registered, it will receive all events generated by audit decorators hooked in this AuditSystem instance. 036 * 037 * @param listener registered listener 038 * @see ConditionalAuditEventListener 039 */ 040 void registerListener(AuditEventListener listener); 041 042 /** 043 * Un-registers an event listener from this audit system. 044 * Once un-registered, it will not receive any event anymore. 045 * 046 * @param listener registered listener to un-register 047 * @see ConditionalAuditEventListener 048 */ 049 void unregisterListener(AuditEventListener listener); 050}