public class ConditionalAuditEventListener extends Object implements AuditEventListener
AuditEventListener
.
It delegates to a given AuditEventListener
if the configured condition evaluates to true
.
If the condition evaluates to anything else (false
, null
, ...), the result is considered
as a false
, and the delegate listener will not be invoked.
This class is not intended to be sub-classed, although its associated Heaplet
is.
Modifier and Type | Class and Description |
---|---|
static class |
ConditionalAuditEventListener.ConditionalListenerHeaplet
Creates and initializes a ConditionalListenerHeaplet in a heap environment.
|
Constructor and Description |
---|
ConditionalAuditEventListener(AuditEventListener delegate,
Expression condition)
Builds a new ConditionalAuditEventListener that will delegates to the given
delegate under the given
condition . |
Modifier and Type | Method and Description |
---|---|
void |
onAuditEvent(AuditEvent event)
Invoked when the audit source generates a new
AuditEvent notification. |
public ConditionalAuditEventListener(AuditEventListener delegate, Expression condition)
delegate
under the given
condition
.delegate
- conditionally invoked listenercondition
- condition to evaluatepublic void onAuditEvent(AuditEvent event)
AuditEventListener
AuditEvent
notification.onAuditEvent
in interface AuditEventListener
event
- audit notificationCopyright © 2014 ForgeRock AS. All rights reserved.