public final class AuditEvent extends Object
Instances of this class are not thread-safe: any filter can possibly update the Exchange
while
processing the audit event. Special care must be taken when dealing with the Exchange.
The source property helps to identify the object that emitted the notification.
The timestamp property gives a time marker to keep events organized in a
sequential manner (expressed in milliseconds).
The exchange property gives a pointer to the captured Exchange
(never null
). There is
no way to guarantee, if the notification is processed in an asynchronous way, that the exchange content was not
modified in the meantime.
The tags property helps to qualify this notification (no duplicated values).
Constructor and Description |
---|
AuditEvent(AuditSource source,
long timestamp,
Exchange exchange,
Collection<String> tags)
Builds a new AuditEvent with provided values.
|
Modifier and Type | Method and Description |
---|---|
Exchange |
getExchange()
Returns the captured
Exchange (never null ). |
AuditSource |
getSource()
Returns the source of the audit event (never
null ). |
Set<String> |
getTags()
Returns an immutable set of event's qualifiers (never
null ). |
long |
getTimestamp()
Returns the timestamp of this event (expressed in milliseconds).
|
public AuditEvent(AuditSource source, long timestamp, Exchange exchange, Collection<String> tags)
source
- source of the event (never null
)timestamp
- creation date of the notification (expressed in milliseconds)exchange
- captured exchange (never null
)tags
- qualifiers (never null
)public AuditSource getSource()
null
).null
).public long getTimestamp()
public Exchange getExchange()
Exchange
(never null
).
Notice that this is a pointer to the being processed exchange (a live object, not a copy), so, if this event
is processed asynchronously, the exchange content may have changed.Exchange
(never null
).Copyright © 2014 ForgeRock AS. All rights reserved.