Package org.springframework.aop.interceptor

Examples of org.springframework.aop.interceptor.SerializableNopInterceptor


   * Create an empty pointcut, populating instance variables.
   * @see junit.framework.TestCase#setUp()
   */
  protected void setUp() {
    ProxyFactory pf = new ProxyFactory(new SerializablePerson());
    nop = new SerializableNopInterceptor();
    pc = new NameMatchMethodPointcut();
    pf.addAdvisor(new DefaultPointcutAdvisor(pc, nop));
    proxied = (Person) pf.getProxy();
  }
View Full Code Here


   
    HotSwappableTargetSource hts = new HotSwappableTargetSource(sp1);
    ProxyFactory pf = new ProxyFactory();
    pf.addInterface(Person.class);
    pf.setTargetSource(hts);
    pf.addAdvisor(new DefaultPointcutAdvisor(new SerializableNopInterceptor()));
    Person p = (Person) pf.getProxy();
   
    assertEquals(sp1.getName(), p.getName());
    hts.swap(sp2);
    assertEquals(sp2.getName(), p.getName());
View Full Code Here

    ProxyFactory pf = new ProxyFactory(personTarget);

    CountingThrowsAdvice cta = new CountingThrowsAdvice();

    pf.addAdvice(new SerializableNopInterceptor());
    // Try various advice types
    pf.addAdvice(new CountingBeforeAdvice());
    pf.addAdvice(new CountingAfterReturningAdvice());
    pf.addAdvice(cta);
    Person p = (Person) createAopProxy(pf).getProxy();
View Full Code Here

    factory.addInterface(Person.class);
    long time = 1000;
    TimeStamped ts = new SerializableTimeStamped(time);
 
    factory.addAdvisor(new DefaultIntroductionAdvisor(new DelegatingIntroductionInterceptor(ts)));
    factory.addAdvice(new SerializableNopInterceptor());
   
    Person p = (Person) factory.getProxy();
   
    assertEquals(name, p.getName());
    assertEquals(time, ((TimeStamped) p).getTimeStamp());
View Full Code Here

TOP

Related Classes of org.springframework.aop.interceptor.SerializableNopInterceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.