Class TracingDecorator

java.lang.Object
org.forgerock.openig.decoration.helper.AbstractDecorator
org.forgerock.openig.decoration.tracing.TracingDecorator
All Implemented Interfaces:
Decorator

public class TracingDecorator extends AbstractDecorator
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.
  • Method Details

    • accepts

      public boolean accepts(Class<?> type)
      Description copied from interface: Decorator
      Returns true if this decorator is compatible with the provided component type. Note that a return value of true 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 provided delegate instance with the provided decoratorConfig configuration. The implementation should take care of not changing the base type of the delegate.
      Parameters:
      delegate - instance to be decorated
      decoratorConfig - the decorator configuration to apply
      context - contextual information of the decorated instance
      Returns:
      a handle of the decoration that was setup, never null.
      Throws:
      HeapException - when decoration fails