public class

MethodSecurityInterceptor

extends AbstractSecurityInterceptor
implements MethodInterceptor
java.lang.Object
   ↳ org.springframework.security.access.intercept.AbstractSecurityInterceptor
     ↳ org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor
Known Direct Subclasses

Class Overview

Provides security interception of AOP Alliance based method invocations.

The SecurityMetadataSource required by this security interceptor is of type MethodSecurityMetadataSource. This is shared with the AspectJ based security interceptor (AspectJSecurityInterceptor), since both work with Java Methods.

Refer to AbstractSecurityInterceptor for details on the workflow.

Summary

[Expand]
Inherited Fields
From class org.springframework.security.access.intercept.AbstractSecurityInterceptor
Public Constructors
MethodSecurityInterceptor()
Public Methods
Class<?> getSecureObjectClass()
Indicates the type of secure objects the subclass will be presenting to the abstract parent for processing.
MethodSecurityMetadataSource getSecurityMetadataSource()
Object invoke(MethodInvocation mi)
This method should be used to enforce security on a MethodInvocation.
SecurityMetadataSource obtainSecurityMetadataSource()
void setSecurityMetadataSource(MethodSecurityMetadataSource newSource)
[Expand]
Inherited Methods
From class org.springframework.security.access.intercept.AbstractSecurityInterceptor
From class java.lang.Object
From interface org.aopalliance.intercept.MethodInterceptor
From interface org.springframework.beans.factory.InitializingBean
From interface org.springframework.context.ApplicationEventPublisherAware
From interface org.springframework.context.MessageSourceAware

Public Constructors

public MethodSecurityInterceptor ()

Public Methods

public Class<?> getSecureObjectClass ()

Indicates the type of secure objects the subclass will be presenting to the abstract parent for processing. This is used to ensure collaborators wired to the AbstractSecurityInterceptor all support the indicated secure object class.

Returns
  • the type of secure object the subclass provides services for

public MethodSecurityMetadataSource getSecurityMetadataSource ()

public Object invoke (MethodInvocation mi)

This method should be used to enforce security on a MethodInvocation.

Parameters
mi The method being invoked which requires a security decision
Returns
  • The returned value from the method invocation (possibly modified by the AfterInvocationManager).
Throws
Throwable if any error occurs

public SecurityMetadataSource obtainSecurityMetadataSource ()

public void setSecurityMetadataSource (MethodSecurityMetadataSource newSource)