On Monday 02 August 2004 04:43, Niclas Hedhman wrote: > > Hmmm? I didn't really have AspectJ in mind, possibly because I feel very > uncomfortable with it. AspectJ could probably be used straight up, without > any support from Merlin itself. > > What I did have in mind was something like this; > > public interface MethodInterceptor > { > Object[] onMethodEntry( Object[] arguments ); > > Object onMethodReturn( Object returnValue ); > } > > public class MyComponent > implements MyInterface > { > /** > * @avalon.interceptor type="org.hedhman.niclas.MyInterceptor" > */ > public boolean myMethod( String value1, int value2 ) > { > > } > }
Real good point, but do you think interface implementation is required? am I wrong or all component carry a proxy so having onMethodEntry/Return is relatively simple. > for explicit interception, and then back that with implicit interception > which can be defined in the Merlin kernel setup. good > Implicit Interception is mainly used for security related stuff, and where > the component authors have no choice. > > Explicit Interception is mainly used by component authors to handle certain > things easier. re-good I like your approach, simple and nice. I continue thinking on that track -- Al --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]