[Logged]
public class LoggingInterceptor: IAroundInvokeInterceptor
{
public virtual object AroundInvoke(IInvocationContext)
{
/* .. do something .. */
}
}
public LoggedAttribute: InterceptorBindingAttribute { }
[Logged]
public class Foo
{
/* all methods will be intercepted */
}
public class Bar
{
[Logged]
public void DoSomething()
{
/* only this method will be intercepted */
}
}
What about events and properties? Most likely yes, it should be able to intercept get/set properties and add/remove events. But perhaps an IPropertyInterceptor and IEventInterceptor is more suited than method-centric IAroundInvokeInterceptor. Java doesn't have properties/events syntax so it's not covered by the CDI spec
Example
What about events and properties? Most likely yes, it should be able to intercept get/set properties and add/remove events. But perhaps an IPropertyInterceptor and IEventInterceptor is more suited than method-centric IAroundInvokeInterceptor. Java doesn't have properties/events syntax so it's not covered by the CDI spec