2009/6/3 ale <[email protected]>

>
> Hi, can this be done?
>

See http://code.google.com/p/google-guice/issues/detail?id=88 for some
suggestions, HTH


> public class FooInterceptor implements MethodInterceptor {
>        private FooService fooService;
>
>        @Inject
>        public EmailInterceptor(FooService fooService) {
>                this.fooService = fooService;
>        }
>
>        @Override
>        public Object invoke(MethodInvocation methodInvocation) throws
> Throwable {
>                try {
>                        fooService.doSomething();
>                        methodInvocation.proceed();
>                } catch (Exception e) {
>                }
>                return null;
>        }
>
> }
>
> Thanks.
>

-- 
Cheers, Stuart

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to