|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.security.AbstractSecurityProxy
An abstract implementation of SecurityProxy that wraps a non-SecurityProxy object. Subclasses of this class are used to create a SecurityProxy given a security delegate that implements methods in the EJB home or remote interface for security checks. This allows custom security classes to be written without using a JBoss specific interface. It also allows the security delegate to follow a natural proxy pattern implementation.
Field Summary | |
protected java.lang.Object |
delegate
The optional setContext delegate method |
protected boolean |
strict
Flag which sets whether the method mapping will be performed in a strict fashion. |
Method Summary | |
void |
init(java.lang.Class beanHome,
java.lang.Class beanRemote,
java.lang.Class beanLocalHome,
java.lang.Class beanLocal,
java.lang.Object securityMgr)
This method is called by the container SecurityInterceptor to intialize the proxy with the EJB home and remote interface classes that the container is housing. |
void |
init(java.lang.Class beanHome,
java.lang.Class beanRemote,
java.lang.Object securityMgr)
This version invokes init(beanHome, beanRemote, null, null, securityMgr) |
void |
invoke(java.lang.reflect.Method m,
java.lang.Object[] args,
java.lang.Object bean)
Called by the SecurityProxyInterceptor to allow the proxy delegate to perform a security check of the indicated remote interface method. |
void |
invokeHome(java.lang.reflect.Method m,
java.lang.Object[] args)
Called by the SecurityProxyInterceptor to allow the proxy delegate to perform a security check of the indicated home interface method. |
protected abstract void |
invokeHomeOnDelegate(java.lang.reflect.Method m,
java.lang.Object[] args,
java.lang.Object delegate)
Subclasses implement this method to actually invoke the given home method on the proxy delegate. |
protected abstract void |
invokeOnDelegate(java.lang.reflect.Method m,
java.lang.Object[] args,
java.lang.Object delegate)
Subclasses implement this method to actually invoke the given remote method on the proxy delegate. |
protected void |
mapHomeMethods(java.lang.Class beanHome)
Performs a mapping from the methods declared in the beanHome class to the proxy delegate class. |
protected void |
mapRemoteMethods(java.lang.Class beanRemote)
Performs a mapping from the methods declared in the beanRemote class to the proxy delegate class. |
void |
setEJBContext(EJBContext (src) ctx)
Called by the SecurityProxyInterceptor prior to a method invocation to set the context for the call. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.Object delegate
protected boolean strict
Method Detail |
protected abstract void invokeHomeOnDelegate(java.lang.reflect.Method m, java.lang.Object[] args, java.lang.Object delegate) throws java.lang.Exception
java.lang.Exception
invokeHome(Method, Object[])
protected abstract void invokeOnDelegate(java.lang.reflect.Method m, java.lang.Object[] args, java.lang.Object delegate) throws java.lang.Exception
java.lang.Exception
invoke(Method, Object[], Object)
public void init(java.lang.Class beanHome, java.lang.Class beanRemote, java.lang.Object securityMgr) throws java.lang.InstantiationException
init
in interface SecurityProxy (src)
beanHome
- The EJB remote home interface classbeanRemote
- The EJB remote interface classsecurityMgr
- The security manager from the security domain
java.lang.InstantiationException
init(Class, Class, Class, Class, Object)
public void init(java.lang.Class beanHome, java.lang.Class beanRemote, java.lang.Class beanLocalHome, java.lang.Class beanLocal, java.lang.Object securityMgr) throws java.lang.InstantiationException
init
in interface SecurityProxy (src)
beanHome
- The EJB remote home interface classbeanRemote
- The EJB remote interface classbeanLocalHome
- The EJB local home interface classbeanLocal
- The EJB local interface classsecurityMgr
- The security manager from the security domain
java.lang.InstantiationException
public void setEJBContext(EJBContext (src) ctx)
setEJBContext
in interface SecurityProxy (src)
ctx
- the bean's EJBContextpublic void invokeHome(java.lang.reflect.Method m, java.lang.Object[] args) throws java.lang.Exception
invokeHome
in interface SecurityProxy (src)
m
- , the EJB home or local home interface methodargs
- , the invocation args
java.lang.Exception
public void invoke(java.lang.reflect.Method m, java.lang.Object[] args, java.lang.Object bean) throws java.lang.Exception
invoke
in interface SecurityProxy (src)
m
- , the EJB remote or local interface methodargs
- , the invocation args
java.lang.Exception
protected void mapHomeMethods(java.lang.Class beanHome)
protected void mapRemoteMethods(java.lang.Class beanRemote)
|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |