|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.security.AbstractSecurityProxy
public abstract class 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 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(Class beanHome,
Class beanRemote,
Class beanLocalHome,
Class beanLocal,
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(Class beanHome,
Class beanRemote,
Object securityMgr)
This version invokes init(beanHome, beanRemote, null, null, securityMgr) |
void |
invoke(Method m,
Object[] args,
Object bean)
Called by the SecurityProxyInterceptor to allow the proxy delegate to perform a security check of the indicated remote interface method. |
void |
invokeHome(Method m,
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(Method m,
Object[] args,
Object delegate)
Subclasses implement this method to actually invoke the given home method on the proxy delegate. |
protected abstract void |
invokeOnDelegate(Method m,
Object[] args,
Object delegate)
Subclasses implement this method to actually invoke the given remote method on the proxy delegate. |
protected void |
mapHomeMethods(Class beanHome)
Performs a mapping from the methods declared in the beanHome class to the proxy delegate class. |
protected void |
mapRemoteMethods(Class beanRemote)
Performs a mapping from the methods declared in the beanRemote class to the proxy delegate class. |
void |
setEJBContext(javax.ejb.EJBContext 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 Object delegate
protected boolean strict
Method Detail |
---|
protected abstract void invokeHomeOnDelegate(Method m, Object[] args, Object delegate) throws Exception
m,
- the delegate method that was mapped from the ejb home method.args,
- the method invocation arguments.delegate,
- the proxy delegate object associated with the
AbstractSecurityProxy
Exception
invokeHome(Method, Object[])
protected abstract void invokeOnDelegate(Method m, Object[] args, Object delegate) throws Exception
m,
- the delegate method that was mapped from the ejb remote method.args,
- the method invocation arguments.delegate,
- the proxy delegate object associated with the AbstractSecurityProxy
Exception
invoke(Method, Object[], Object)
public void init(Class beanHome, Class beanRemote, Object securityMgr) throws InstantiationException
init
in interface SecurityProxy
beanHome,
- the class for the EJB home interfacebeanRemote,
- the class for the EJB remote interfacesecurityMgr,
- The security manager instance assigned to the container.
It is not used by this class.
InstantiationException
init(Class, Class, Class, Class, Object)
public void init(Class beanHome, Class beanRemote, Class beanLocalHome, Class beanLocal, Object securityMgr) throws InstantiationException
init
in interface SecurityProxy
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
InstantiationException
public void setEJBContext(javax.ejb.EJBContext ctx)
setEJBContext
in interface SecurityProxy
ctx
- the bean's EJBContextpublic void invokeHome(Method m, Object[] args) throws Exception
invokeHome
in interface SecurityProxy
m,
- the EJB home interface methodargs,
- the method arguments
Exception
public void invoke(Method m, Object[] args, Object bean) throws Exception
invoke
in interface SecurityProxy
m,
- the EJB remote interface methodargs,
- the method argumentsbean,
- the EJB bean instance
Exception
protected void mapHomeMethods(Class beanHome)
protected void mapRemoteMethods(Class beanRemote)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |