Class AbstractHandlerAndFilterDecorator

    • Constructor Detail

      • AbstractHandlerAndFilterDecorator

        protected AbstractHandlerAndFilterDecorator​(String name)
        Deprecated.
        Forces to give the name of the decorator.
        Parameters:
        name - The name of the decorator.
    • Method Detail

      • accepts

        public final boolean accepts​(Class<?> type)
        Deprecated.
        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 final DecorationHandle decorate​(Object delegate,
                                               JsonValue decoratorConfig,
                                               Context context)
                                        throws HeapException
        Deprecated.
        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
      • decorateHandler

        protected abstract DecorationHandle decorateHandler​(Handler delegate,
                                                            JsonValue decoratorConfig,
                                                            Context context)
                                                     throws HeapException
        Deprecated.
        Decorates the provided delegate Handler instance with the provided decoratorConfig configuration.
        Parameters:
        delegate - Handler instance to be decorated
        decoratorConfig - the decorator configuration to apply
        context - contextual information of the decorated instance
        Returns:
        a handle to the decoration
        Throws:
        HeapException - when decoration fails
      • decorateFilter

        protected abstract DecorationHandle decorateFilter​(Filter delegate,
                                                           JsonValue decoratorConfig,
                                                           Context context)
                                                    throws HeapException
        Deprecated.
        Decorates the provided delegate Filter instance with the provided decoratorConfig configuration.
        Parameters:
        delegate - Filter instance to be decorated
        decoratorConfig - the decorator configuration to apply
        context - contextual information of the decorated instance
        Returns:
        a handle to the decoration
        Throws:
        HeapException - when decoration fails