@Deprecated public class AuditDecorator extends AbstractHandlerAndFilterDecorator
Handler
and Filter
instances.
It triggers notifications (AuditEvent
) to an
AuditSystem
sink.
Each AuditEvent
includes a source marker that will indicate that the event comes
from the decorated component.
Each notification includes a set of tags that helps the notification receiver to filter the events with simple matching rules. Here is the list of built-in tags:
Tag.request
: The event happens before the delegate
Filter
/Handler
is calledTag.response
: The event happens after the delegate
Filter
/Handler
was calledTag.completed
: The event happens when the request has been completely
handled successfully
by the processing unit (always complements a Tag.response
tag)Tag.exception
: The event happens when the request has been handled
with errors
by the processing unit (always complements a Tag.response
tag).
Notice that this does not indicate that
the source heap object is the origin of the failure (it may or may not have thrown the exception itself).The user can add extra tags to the list of tags that decorates the notification, in order to help notification qualification:
"audit": "route-#1" // add a single tag to the decorated component
"audit": [ "super-tag", "route-#2" ] // add all of theses tags
"audit": boolean, object, ... // any other format will be ignored
Notice that the attribute name in the decorated object has to be the same as the decorator
heap object name (audit
in our example).
A default audit decorator is automatically created when OpenIG starts.
Tag
Constructor and Description |
---|
AuditDecorator(AuditSystem auditSystem)
Deprecated.
Builds a new AuditDecorator that will send events to the provided AuditSystem.
|
Modifier and Type | Method and Description |
---|---|
protected Filter |
decorateFilter(Filter delegate,
JsonValue decoratorConfig,
Context context)
Deprecated.
|
protected Handler |
decorateHandler(Handler delegate,
JsonValue decoratorConfig,
Context context)
Deprecated.
|
accepts, decorate
public AuditDecorator(AuditSystem auditSystem)
auditSystem
- AuditSystem reference (cannot be null
)protected Filter decorateFilter(Filter delegate, JsonValue decoratorConfig, Context context) throws HeapException
AbstractHandlerAndFilterDecorator
decorateFilter
in class AbstractHandlerAndFilterDecorator
delegate
- Filter instance to be decorateddecoratorConfig
- the decorator configuration to applycontext
- contextual information of the decorated instanceHeapException
- when decoration failsprotected Handler decorateHandler(Handler delegate, JsonValue decoratorConfig, Context context) throws HeapException
AbstractHandlerAndFilterDecorator
decorateHandler
in class AbstractHandlerAndFilterDecorator
delegate
- Handler instance to be decorateddecoratorConfig
- the decorator configuration to applycontext
- contextual information of the decorated instanceHeapException
- when decoration failsCopyright 2011-2015 ForgeRock AS.