org.apache.tapestry5.ioc.services
Interface AspectInterceptorBuilder<T>

All Known Implementing Classes:
AspectInterceptorBuilderImpl

public interface AspectInterceptorBuilder<T>

A builder may be obtained from the AspectDecorator and allows more controlled creation of the created interceptor; it allows different methods to be given different advice, and allows methods to be omitted (in which case the method invocation passes through without advice).


Method Summary
 void adviseAllMethods(MethodAdvice advice)
          Advises all methods of the interface with the given advice.
 void adviseMethod(Method method, MethodAdvice advice)
          Adds advice for a specific method of the aspect interceptor being constructed.
 T build()
          Builds and returns the interceptor.
 

Method Detail

adviseMethod

void adviseMethod(Method method,
                  MethodAdvice advice)
Adds advice for a specific method of the aspect interceptor being constructed.

Parameters:
method - method (of the interface for which an interceptor is being constructed) to be advised. Multiple advice is allowed for a single method; the advice will be executed in the order it is added.
advice - the advice for this particular method. Advice must be threadsafe.

adviseAllMethods

void adviseAllMethods(MethodAdvice advice)
Advises all methods of the interface with the given advice.


build

T build()
Builds and returns the interceptor. Any methods that have not been advised will become "pass thrus".



Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.