Interface InterceptorBuilder<T>

  • All Known Implementing Classes:
    JavassistInterceptorBuilder

    public interface InterceptorBuilder<T>
    The InterceptorBuilder is the root builder for an interceptor proxy, otherwise known as a "protection" proxy or "Around Advice" in AOP. This class represents the start state in the builder graph, which may go through one or more intermediate steps before creating the final proxy. The API for building an interceptor proxy is a simple "fluent interface" design:
    Target proxy = proxyFactory.buildInterceptor(Target.class)
                      .on(myTarget)
                      .using(method1, interceptor1)
                      .using(method2, interceptor2, interceptor3)
                      .create(); 
    One or more intermediate using() methods will be called prior to creating the final interceptor proxy.
    Author:
    Brennan Spies
    See Also:
    ProxyFactory.buildInterceptor(Class)
    • Method Detail

      • on

        InterceptorBindingBuilder<T> on​(T target)
        Specifies the target of the method interceptor(s).
        Parameters:
        target - The target
        Returns:
        An intermediate builder for binding interceptors