org.skife.intercept.interceptors.security
Class SecurityInterceptor

java.lang.Object
  |
  +--org.skife.intercept.interceptors.security.SecurityInterceptor
All Implemented Interfaces:
Interceptor

public class SecurityInterceptor
extends java.lang.Object
implements Interceptor

Interceptor which tests security constraints specified in a SecurityBroker and provides the Actor to the object being intercepted if it provides a setActor(Actor) method.


Constructor Summary
SecurityInterceptor()
          Uses a default SecurityBroker set to allow all calls
SecurityInterceptor(org.skife.intercept.interceptors.security.SecurityBroker broker)
          Create a new AccessInterceptor
 
Method Summary
 java.lang.Object intercept(java.lang.Object base, java.lang.reflect.Method method, java.lang.Object[] args, org.skife.intercept.InterceptorStack stack)
          Do the work
 void setSecurityBroker(org.skife.intercept.interceptors.security.SecurityBroker broker)
          Specify the security broker to use
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityInterceptor

public SecurityInterceptor(org.skife.intercept.interceptors.security.SecurityBroker broker)
Create a new AccessInterceptor


SecurityInterceptor

public SecurityInterceptor()
Uses a default SecurityBroker set to allow all calls

Method Detail

setSecurityBroker

public void setSecurityBroker(org.skife.intercept.interceptors.security.SecurityBroker broker)
Specify the security broker to use


intercept

public java.lang.Object intercept(java.lang.Object base,
                                  java.lang.reflect.Method method,
                                  java.lang.Object[] args,
                                  org.skife.intercept.InterceptorStack stack)
                           throws java.lang.Throwable
Do the work

Specified by:
intercept in interface Interceptor
Parameters:
base - A reference to the base object being intercepted
method - A reference to the Method being intercepted
args - The invocation arguments
stack - The InterceptorStack
Returns:
a value to be returned by the method invocation
Throws:
AccessError - if the invocation is blocked for security reasons
java.lang.Throwable