use of cn.taketoday.aop.mixin.LockMixinAdvisor in project today-framework by TAKETODAY.
the class UnsupportedInterceptor method getIntroductionAdvisorProxy.
private ITestBean getIntroductionAdvisorProxy(TestBean target) {
ProxyFactory pf = new ProxyFactory(ITestBean.class);
pf.setProxyTargetClass(true);
pf.addAdvisor(new LockMixinAdvisor());
pf.setTarget(target);
pf.setFrozen(true);
pf.setExposeProxy(false);
return (ITestBean) pf.getProxy();
}
use of cn.taketoday.aop.mixin.LockMixinAdvisor in project today-framework by TAKETODAY.
the class AbstractAopProxyTests method testMixinWithIntroductionAdvisor.
/**
* Test stateful interceptor
*/
@Test
public void testMixinWithIntroductionAdvisor() throws Throwable {
TestBean tb = new TestBean();
ProxyFactory pc = new ProxyFactory();
pc.addInterface(ITestBean.class);
pc.addAdvisor(new LockMixinAdvisor());
pc.setTarget(tb);
testTestBeanIntroduction(pc);
}
Aggregations