|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.ejb.security.application.EJBSecurityManager
public final class EJBSecurityManager
This class is used by the EJB server to manage security. All the container object only call into this object for managing security. This class cannot be subclassed.
An instance of this class should be created per deployment unit.
| Constructor Summary | |
|---|---|
EJBSecurityManager(EjbDescriptor ejbDescriptor,
InvocationManager invMgr,
EJBSecurityManagerFactory fact)
This method iniitalizes the EJBSecurityManager |
|
| Method Summary | |
|---|---|
boolean |
authorize(ComponentInvocation compInv)
This method is called by the EJB container to decide whether or not a method specified in the Invocation should be allowed. |
void |
destroy()
|
Object |
doAsPrivileged(PrivilegedExceptionAction pea)
|
Principal |
getCallerPrincipal()
This method returns the Client Principal who initiated the current Invocation. |
static String |
getContextID(EjbDescriptor ejbDesc)
|
Subject |
getCurrentSubject()
This will return the subject associated with the current call. |
boolean |
getUsesCallerIdentity()
|
Object |
invoke(Method beanClassMethod,
boolean isLocal,
Object o,
Object[] oa)
This method is similiar to the runMethod, except it keeps the semantics same as the one in reflection. |
boolean |
isCallerInRole(String role)
This method returns a boolean value indicating whether or not the caller is in the specified role. |
void |
loadPolicyConfiguration(EjbDescriptor eDescriptor)
|
void |
postInvoke(ComponentInvocation inv)
This method is used by Message Driven Bean Container to remove the run-as identity information that was set up using the preSetRunAsIdentity method |
void |
preInvoke(ComponentInvocation inv)
This method is used by MDB Container - Invocation Manager to setup the run-as identity information. |
void |
resetPolicyContext()
|
Object |
runMethod(Method beanClassMethod,
Object obj,
Object[] oa)
Runs a business method of an EJB withint the bean's policy context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EJBSecurityManager(EjbDescriptor ejbDescriptor,
InvocationManager invMgr,
EJBSecurityManagerFactory fact)
throws Exception
Exception| Method Detail |
|---|
public boolean getUsesCallerIdentity()
public void loadPolicyConfiguration(EjbDescriptor eDescriptor)
throws Exception
Exceptionpublic static String getContextID(EjbDescriptor ejbDesc)
public boolean authorize(ComponentInvocation compInv)
authorize in interface SecurityManagercompInv - invocation object that contains all the details of the
invocation.
public void preInvoke(ComponentInvocation inv)
preInvoke in interface SecurityManagerpublic void postInvoke(ComponentInvocation inv)
postInvoke in interface SecurityManagerpublic boolean isCallerInRole(String role)
isCallerInRole in interface SecurityManagerrole - role name in the form of java.lang.String
public Principal getCallerPrincipal()
getCallerPrincipal in interface SecurityManagerpublic void destroy()
destroy in interface SecurityManagerpublic Subject getCurrentSubject()
getCurrentSubject in interface SecurityManager
public Object doAsPrivileged(PrivilegedExceptionAction pea)
throws Throwable
doAsPrivileged in interface SecurityManagerThrowable
public Object runMethod(Method beanClassMethod,
Object obj,
Object[] oa)
throws Throwable
beanClassMethod - the EJB business methodobj - the EJB bean instanceoa - parameters passed to beanClassMethod
InvocationTargetException - if the underlying method throws an exception
Throwable - other throwables in other cases
public Object invoke(Method beanClassMethod,
boolean isLocal,
Object o,
Object[] oa)
throws Throwable
invoke in interface SecurityManagerbeanClassMethod, - the bean class method to be invokedisLocal, - true if this invocation is through the local EJB viewo - the object on which this method is to be
invoked in this case the ejb,oa - the parameters for the method,c, - the container instance
can be a null value, where in the container will be queried to
find its security manager.
Throwablepublic void resetPolicyContext()
resetPolicyContext in interface SecurityManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||