Class PageMethodInterceptor

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

    @Component("tapirPageMethodInterceptor")
    @Scope("prototype")
    public class PageMethodInterceptor
    extends java.lang.Object
    implements org.aopalliance.intercept.MethodInterceptor
    Wraps a MethodInterceptor around the invocation result. There are three possible cases:
    1. The result is an instance of TapirElement: A PageCheckMethodInterceptor is wrapped around the result
    2. The result is annotated with PageComponent: A PageMethodInterceptor is wrapped around the result
    3. Case 1 and 2 don't match: The result is returned unwrapped.
    Since:
    2.0.0
    Author:
    Oliver Libutzki <[email protected]>
    • Constructor Detail

      • PageMethodInterceptor

        public PageMethodInterceptor​(PageActiveCheck pageActiveAssertion)
        Constructs a PageMethodInterceptor.
        Parameters:
        pageActiveAssertion - page assertion
        Since:
        2.0.0
    • Method Detail

      • invoke

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