|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.catalina.security.SecurityUtil
public final class SecurityUtil
This utility class associates a Subject
to the current
AccessControlContext
. When a SecurityManager
is
used, the container will always associate the called thread with an
AccessControlContext containing only the principal of the requested
Servlet/Filter.
This class uses reflection to invoke the invoke methods.
Constructor Summary | |
---|---|
SecurityUtil()
|
Method Summary | |
---|---|
static void |
doAsPrivilege(java.lang.String methodName,
javax.servlet.Filter targetObject)
Perform work as a particular Subject. |
static void |
doAsPrivilege(java.lang.String methodName,
javax.servlet.Filter targetObject,
java.lang.Class[] targetType,
java.lang.Object[] targetArguments)
Perform work as a particular Subject . |
static void |
doAsPrivilege(java.lang.String methodName,
javax.servlet.Filter targetObject,
java.lang.Class[] targetType,
java.lang.Object[] targetArguments,
java.security.Principal principal)
Perform work as a particular Subject . |
static void |
doAsPrivilege(java.lang.String methodName,
javax.servlet.Servlet targetObject)
Perform work as a particular Subject. |
static void |
doAsPrivilege(java.lang.String methodName,
javax.servlet.Servlet targetObject,
java.lang.Class[] targetType,
java.lang.Object[] targetArguments)
Perform work as a particular Subject. |
static void |
doAsPrivilege(java.lang.String methodName,
javax.servlet.Servlet targetObject,
java.lang.Class[] targetType,
java.lang.Object[] targetArguments,
java.security.Principal principal)
Perform work as a particular Subject. |
static boolean |
isPackageProtectionEnabled()
Return the SecurityManager only if Security is enabled AND
package protection mechanism is enabled. |
static void |
remove(java.lang.Object cachedObject)
Remove the object from the cache. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SecurityUtil()
Method Detail |
---|
public static void doAsPrivilege(java.lang.String methodName, javax.servlet.Servlet targetObject) throws java.lang.Exception
null
subject.
methodName
- the method to apply the security restrictiontargetObject
- the Servlet
on which the method will
be called.
java.lang.Exception
public static void doAsPrivilege(java.lang.String methodName, javax.servlet.Servlet targetObject, java.lang.Class[] targetType, java.lang.Object[] targetArguments) throws java.lang.Exception
null
subject.
methodName
- the method to apply the security restrictiontargetObject
- the Servlet
on which the method will
be called.targetType
- Class
array used to instanciate a i
Method
object.targetArguments
- Object
array contains the runtime
parameters instance.
java.lang.Exception
public static void doAsPrivilege(java.lang.String methodName, javax.servlet.Servlet targetObject, java.lang.Class[] targetType, java.lang.Object[] targetArguments, java.security.Principal principal) throws java.lang.Exception
null
subject.
methodName
- the method to apply the security restrictiontargetObject
- the Servlet
on which the method will
be called.targetType
- Class
array used to instanciate a
Method
object.targetArguments
- Object
array contains the
runtime parameters instance.principal
- the Principal
to which the security
privilege apply..
java.lang.Exception
public static void doAsPrivilege(java.lang.String methodName, javax.servlet.Filter targetObject) throws java.lang.Exception
null
subject.
methodName
- the method to apply the security restrictiontargetObject
- the Filter
on which the method will
be called.
java.lang.Exception
public static void doAsPrivilege(java.lang.String methodName, javax.servlet.Filter targetObject, java.lang.Class[] targetType, java.lang.Object[] targetArguments) throws java.lang.Exception
Subject
. Here the work
will be granted to a null
subject.
methodName
- the method to apply the security restrictiontargetObject
- the Filter
on which the method will
be called.targetType
- Class
array used to instanciate a
Method
object.targetArguments
- Object
array contains the
runtime parameters instance.
java.lang.Exception
public static void doAsPrivilege(java.lang.String methodName, javax.servlet.Filter targetObject, java.lang.Class[] targetType, java.lang.Object[] targetArguments, java.security.Principal principal) throws java.lang.Exception
Subject
. Here the work
will be granted to a null
subject.
methodName
- the method to apply the security restrictiontargetObject
- the Filter
on which the method will
be called.targetType
- Class
array used to instanciate a
Method
object.targetArguments
- Object
array contains the
runtime parameters instance.principal
- the Principal
to which the security
privilege apply
java.lang.Exception
public static void remove(java.lang.Object cachedObject)
cachedObject
- The object to removepublic static boolean isPackageProtectionEnabled()
SecurityManager
only if Security is enabled AND
package protection mechanism is enabled.
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |