Package org.apache.shiro.aop
Interface MethodInterceptor
-
- All Known Implementing Classes:
AnnotationMethodInterceptor
,AnnotationsAuthorizingMethodInterceptor
,AuthenticatedAnnotationMethodInterceptor
,AuthorizingAnnotationMethodInterceptor
,AuthorizingMethodInterceptor
,GuestAnnotationMethodInterceptor
,MethodInterceptorSupport
,PermissionAnnotationMethodInterceptor
,RoleAnnotationMethodInterceptor
,UserAnnotationMethodInterceptor
public interface MethodInterceptor
A MethodInterceptor intercepts a MethodInvocation to perform before or after logic (aka 'advice').Shiro's implementations of this interface mostly have to deal with ensuring a current Subject has the ability to execute the method before allowing it to continue.
- Since:
- 0.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
invoke(MethodInvocation methodInvocation)
Invokes the specifiedMethodInvocation
, allowing implementations to perform pre/post/finally surrounding the actual invocation.
-
-
-
Method Detail
-
invoke
Object invoke(MethodInvocation methodInvocation) throws Throwable
Invokes the specifiedMethodInvocation
, allowing implementations to perform pre/post/finally surrounding the actual invocation.- Parameters:
methodInvocation
- theMethodInvocation
to execute.- Returns:
- the result of the invocation
- Throws:
Throwable
- if the method invocation throws a Throwable or if an error occurs in pre/post/finally advice.
-
-