org.objectweb.easybeans.security.interceptors
Class AccessInterceptor

java.lang.Object
  extended by org.objectweb.easybeans.security.interceptors.AccessInterceptor
All Implemented Interfaces:
EasyBeansInterceptor

public class AccessInterceptor
extends java.lang.Object
implements EasyBeansInterceptor

This interceptor checks that the role is allowed to call the given method.

Author:
Florent Benoit

Constructor Summary
AccessInterceptor()
           
 
Method Summary
 java.lang.Object intercept(EasyBeansInvocationContext invocationContext)
          Grant access to the given method by checking roles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccessInterceptor

public AccessInterceptor()
Method Detail

intercept

public java.lang.Object intercept(EasyBeansInvocationContext invocationContext)
                           throws java.lang.Exception
Grant access to the given method by checking roles.

Specified by:
intercept in interface EasyBeansInterceptor
Parameters:
invocationContext - context with useful attributes on the current invocation
Returns:
result of the next invocation (to chain interceptors)
Throws:
java.lang.Exception - if interceptor fails