Class TracingDecorator
java.lang.Object
org.forgerock.openig.decoration.helper.AbstractDecorator
org.forgerock.openig.decoration.tracing.TracingDecorator
- All Implemented Interfaces:
Decorator
The tracing decorator can decorate
Filter
and Handler
instances along with any
factories defined in the META-INF/services
resources directory.
It has to be declared inside a heap objects section:
{
"name": "myTracingDecorator",
"type": "TracingDecorator"
}
To decorate a component, just add the decorator declaration next to the
config
element:
{
"type": "...",
"tracing": true,
"config": { ... }
}
A default tracing decorator is automatically created during startup.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Creates and initializes a TracingDecorator in a heap environment. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if this decorator is compatible with the provided component type.Decorates the provideddelegate
instance with the provideddecoratorConfig
configuration.Methods inherited from class org.forgerock.openig.decoration.helper.AbstractDecorator
getLogger
-
Method Details
-
accepts
Description copied from interface:Decorator
Returnstrue
if this decorator is compatible with the provided component type. Note that a return value oftrue
does not necessarily indicate that decoration will be performed since it may also depend on other factors- Parameters:
type
- type under test- Returns:
true
if the decorator can decorate instance of the given type,false
otherwise.
-
decorate
public DecorationHandle decorate(Object delegate, JsonValue decoratorConfig, Context context) throws HeapException Description copied from interface:Decorator
Decorates the provideddelegate
instance with the provideddecoratorConfig
configuration. The implementation should take care of not changing the base type of the delegate.- Parameters:
delegate
- instance to be decorateddecoratorConfig
- the decorator configuration to applycontext
- contextual information of the decorated instance- Returns:
- a handle of the decoration that was setup, never
null
. - Throws:
HeapException
- when decoration fails
-