org.springframework.security.access.intercept.aspectj
Class AspectJMethodSecurityInterceptor
java.lang.Object
org.springframework.security.access.intercept.AbstractSecurityInterceptor
org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor
org.springframework.security.access.intercept.aspectj.AspectJMethodSecurityInterceptor
- All Implemented Interfaces:
- org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, InitializingBean, ApplicationEventPublisherAware, MessageSourceAware
public final class AspectJMethodSecurityInterceptor
- extends MethodSecurityInterceptor
AspectJ JoinPoint
security interceptor which wraps the JoinPoint
in a MethodInvocation
adapter to make it compatible with security infrastructure classes which only support MethodInvocation
s.
One of the invoke
methods should be called from the around()
advice in your aspect.
Alternatively you can use one of the pre-defined aspects from the aspects module.
- Since:
- 3.0.3
Method Summary |
Object |
invoke(org.aspectj.lang.JoinPoint jp)
Method that is suitable for user with @Aspect notation. |
Object |
invoke(org.aspectj.lang.JoinPoint jp,
AspectJCallback advisorProceed)
Method that is suitable for user with traditional AspectJ-code aspects. |
Methods inherited from class org.springframework.security.access.intercept.AbstractSecurityInterceptor |
afterInvocation, afterPropertiesSet, beforeInvocation, getAccessDecisionManager, getAfterInvocationManager, getAuthenticationManager, getRunAsManager, isAlwaysReauthenticate, isRejectPublicInvocations, isValidateConfigAttributes, setAccessDecisionManager, setAfterInvocationManager, setAlwaysReauthenticate, setApplicationEventPublisher, setAuthenticationManager, setMessageSource, setRejectPublicInvocations, setRunAsManager, setValidateConfigAttributes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AspectJMethodSecurityInterceptor
public AspectJMethodSecurityInterceptor()
invoke
public Object invoke(org.aspectj.lang.JoinPoint jp)
throws Throwable
- Method that is suitable for user with @Aspect notation.
- Parameters:
jp
- The AspectJ joint point being invoked which requires a security decision
- Returns:
- The returned value from the method invocation
- Throws:
Throwable
- if the invocation throws one
invoke
public Object invoke(org.aspectj.lang.JoinPoint jp,
AspectJCallback advisorProceed)
- Method that is suitable for user with traditional AspectJ-code aspects.
- Parameters:
jp
- The AspectJ joint point being invoked which requires a security decisionadvisorProceed
- the advice-defined anonymous class that implements AspectJCallback
containing
a simple return proceed();
statement
- Returns:
- The returned value from the method invocation