public class BaseUriDecorator extends AbstractHandlerAndFilterDecorator
Filter
and Handler
instances.
It has to be declared inside of the heap objects section:
{
"name": "myBaseUri",
"type": "BaseUriDecorator"
}
To decorate a component, just add the decorator declaration next to the config
element:
{
"type": "...",
"myBaseUri": "http://www.example.com",
"config": { ... }
}
The baseURI has to be a string otherwise, the decoration will be ignored.
N.B: The Gateway Servlet creates a default BaseUriDecorator named "baseURI" at startup time.
Modifier and Type | Class and Description |
---|---|
static class |
BaseUriDecorator.Heaplet
Creates and initializes a baseUri in a heap environment.
|
Constructor and Description |
---|
BaseUriDecorator()
Builds a new base uri decorator with a null sink reference.
|
BaseUriDecorator(LazyReference<LogSink> reference)
Builds a new base uri decorator with the given sink reference (possibly
null ). |
Modifier and Type | Method and Description |
---|---|
protected Filter |
decorateFilter(Filter delegate,
JsonValue decoratorConfig,
Context context)
|
protected Handler |
decorateHandler(Handler delegate,
JsonValue decoratorConfig,
Context context)
|
accepts, decorate
public BaseUriDecorator()
public BaseUriDecorator(LazyReference<LogSink> reference)
null
).reference
- Log Sink reference for message capture (may 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.