org.apache.shiro.spring.security.interceptor
Class AopAllianceAnnotationsAuthorizingMethodInterceptor

java.lang.Object
  extended by org.apache.shiro.aop.MethodInterceptorSupport
      extended by org.apache.shiro.authz.aop.AuthorizingMethodInterceptor
          extended by org.apache.shiro.authz.aop.AnnotationsAuthorizingMethodInterceptor
              extended by org.apache.shiro.spring.security.interceptor.AopAllianceAnnotationsAuthorizingMethodInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, MethodInterceptor

public class AopAllianceAnnotationsAuthorizingMethodInterceptor
extends AnnotationsAuthorizingMethodInterceptor
implements org.aopalliance.intercept.MethodInterceptor

Allows Shiro Annotations to work in any AOP Alliance specific implementation environment (for example, Spring).

Since:
0.2

Field Summary
 
Fields inherited from class org.apache.shiro.authz.aop.AnnotationsAuthorizingMethodInterceptor
methodInterceptors
 
Constructor Summary
AopAllianceAnnotationsAuthorizingMethodInterceptor()
           
 
Method Summary
protected  Object continueInvocation(Object aopAllianceMethodInvocation)
          Simply casts the method argument to an org.aopalliance.intercept.MethodInvocation and then calls methodInvocation.proceed()
protected  MethodInvocation createMethodInvocation(Object implSpecificMethodInvocation)
          Creates a MethodInvocation that wraps an org.aopalliance.intercept.MethodInvocation instance, enabling Shiro Annotations in AOP Alliance environments (Spring, etc).
 Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation)
          Creates a Shiro MethodInvocation instance and then immediately calls super.invoke.
 
Methods inherited from class org.apache.shiro.authz.aop.AnnotationsAuthorizingMethodInterceptor
assertAuthorized, getMethodInterceptors, setMethodInterceptors
 
Methods inherited from class org.apache.shiro.authz.aop.AuthorizingMethodInterceptor
invoke
 
Methods inherited from class org.apache.shiro.aop.MethodInterceptorSupport
getSubject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AopAllianceAnnotationsAuthorizingMethodInterceptor

public AopAllianceAnnotationsAuthorizingMethodInterceptor()
Method Detail

createMethodInvocation

protected MethodInvocation createMethodInvocation(Object implSpecificMethodInvocation)
Creates a MethodInvocation that wraps an org.aopalliance.intercept.MethodInvocation instance, enabling Shiro Annotations in AOP Alliance environments (Spring, etc).

Parameters:
implSpecificMethodInvocation - AOP Alliance MethodInvocation
Returns:
a Shiro MethodInvocation instance that wraps the AOP Alliance instance.

continueInvocation

protected Object continueInvocation(Object aopAllianceMethodInvocation)
                             throws Throwable
Simply casts the method argument to an org.aopalliance.intercept.MethodInvocation and then calls methodInvocation.proceed()

Parameters:
aopAllianceMethodInvocation - the org.aopalliance.intercept.MethodInvocation
Returns:
the org.aopalliance.intercept.MethodInvocation.proceed() method call result.
Throws:
Throwable - if the underlying AOP Alliance proceed() call throws a Throwable.

invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation)
              throws Throwable
Creates a Shiro MethodInvocation instance and then immediately calls super.invoke.

Parameters:
methodInvocation - the AOP Alliance-specific methodInvocation instance.
Returns:
the return value from invoking the method invocation.
Throws:
Throwable - if the underlying AOP Alliance method invocation throws a Throwable.


Copyright © 2004-2014 The Apache Software Foundation. All Rights Reserved.