Class PageMethodInterceptor
- java.lang.Object
-
- de.bmiag.tapir.page.aop.pageobject.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 aMethodInterceptor
around the invocation result. There are three possible cases:- The result is an instance of
TapirElement
: APageCheckMethodInterceptor
is wrapped around the result - The result is annotated with
PageComponent
: APageMethodInterceptor
is wrapped around the result - Case 1 and 2 don't match: The result is returned unwrapped.
- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description PageMethodInterceptor(PageActiveCheck pageActiveAssertion)
Constructs a PageMethodInterceptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PageCheckMethodInterceptor
getPageCheckMethodInterceptor()
protected PageMethodInterceptor
getPageMethodInterceptor()
java.lang.Object
invoke(org.aopalliance.intercept.MethodInvocation invocation)
-
-
-
Constructor Detail
-
PageMethodInterceptor
public PageMethodInterceptor(PageActiveCheck pageActiveAssertion)
Constructs a PageMethodInterceptor.- Parameters:
pageActiveAssertion
- page assertion- Since:
- 2.0.0
-
-
Method Detail
-
getPageCheckMethodInterceptor
protected PageCheckMethodInterceptor getPageCheckMethodInterceptor()
-
getPageMethodInterceptor
protected PageMethodInterceptor getPageMethodInterceptor()
-
invoke
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws java.lang.Throwable
- Specified by:
invoke
in interfaceorg.aopalliance.intercept.MethodInterceptor
- Throws:
java.lang.Throwable
-
-