Class ScrapingInterceptor

  • All Implemented Interfaces:
    org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

    public final class ScrapingInterceptor
    extends Object
    implements org.aopalliance.intercept.MethodInterceptor
    Guice AOP interceptor responsible for taking action for method annotated with Scraping annotation. New scraping scope is created for each annotated method and is persistent until the end of invocation. Only ancestors of Harvester are applicable. An attempt to apply scraping scope to any other type will end up with thrown IllegalStateException. Just after the scope is created and shortly before it is left all registered ScrapingAware listeners are notified about the lifecycle change.
    Since:
    2.1.0-SNAPSHOT
    Version:
    %I%, %G%
    Author:
    Robert Bala
    See Also:
    Scraping, MethodInterceptor, ScrapingAware
    • Constructor Detail

      • ScrapingInterceptor

        public ScrapingInterceptor()
    • Method Detail

      • invoke

        public Object invoke​(org.aopalliance.intercept.MethodInvocation invocation)
                      throws Throwable
        Specified by:
        invoke in interface org.aopalliance.intercept.MethodInterceptor
        Throws:
        Throwable