public class TimerDecorator extends AbstractHandlerAndFilterDecorator
Filter
and Handler
instances.
It will log started, elapsed and elapsed-within events into the LogSink
of the decorated heap object.
It has to be declared inside of the heap objects section:
{
"name": "timer",
"type": "TimerDecorator"
}
To decorate a component, just add the decorator declaration next to the config
element:
{
"type": "...",
"timer": true,
"config": { ... }
}
There is no special configuration required for this decorator.
A default timer decorator is automatically created when OpenIG starts.Modifier and Type | Class and Description |
---|---|
static class |
TimerDecorator.Heaplet
Creates and initializes a TimerDecorator in a heap environment.
|
Modifier and Type | Field and Description |
---|---|
static String |
TIMER_HEAP_KEY
Key to retrieve a
TimerDecorator instance from the Heap . |
Constructor and Description |
---|
TimerDecorator() |
Modifier and Type | Method and Description |
---|---|
protected Filter |
decorateFilter(Filter delegate,
org.forgerock.json.fluent.JsonValue decoratorConfig,
Context context)
|
protected Handler |
decorateHandler(Handler delegate,
org.forgerock.json.fluent.JsonValue decoratorConfig,
Context context)
|
accepts, decorate
public static final String TIMER_HEAP_KEY
TimerDecorator
instance from the Heap
.public TimerDecorator()
protected Filter decorateFilter(Filter delegate, org.forgerock.json.fluent.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, org.forgerock.json.fluent.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 © 2014 ForgeRock AS. All rights reserved.