Class SampleAdvice1
java.lang.Object
info.ejava.examples.svc.aop.items.proxyfactory.SampleAdvice1
- All Implemented Interfaces:
org.aopalliance.aop.Advice
,org.springframework.aop.AfterAdvice
,org.springframework.aop.AfterReturningAdvice
,org.springframework.aop.BeforeAdvice
,org.springframework.aop.MethodBeforeAdvice
public class SampleAdvice1
extends Object
implements org.springframework.aop.MethodBeforeAdvice, org.springframework.aop.AfterReturningAdvice
This class provides programmatic advice definitions that can be assigned using
a ProxyFactory
ProxyFactory proxyFactory = new ProxyFactory(mowerService); proxyFactory.addAdvice(new SampleAdvice1()); ItemsServiceproxiedMowerService = (ItemsService ) proxyFactory.getProxy(); proxiedMowerService.createItem(mower2);
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SampleAdvice1
public SampleAdvice1()
-
-
Method Details
-
before
- Specified by:
before
in interfaceorg.springframework.aop.MethodBeforeAdvice
- Throws:
Throwable
-
afterReturning
public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable - Specified by:
afterReturning
in interfaceorg.springframework.aop.AfterReturningAdvice
- Throws:
Throwable
-