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 methods.
| Modifier and Type | Field and Description |
|---|---|
| private static final Map | classCache
Cache every class for which we are creating methods. |
| private static final int | |
| private static final String | |
| private static final int | |
| private static final String | |
| private static final int | |
| private static final String | |
| private static final int | |
| private static final String | |
| private static final int | |
| private static final String | |
| private static final Log | |
| private static final boolean | |
| private static final int | |
| private static final String | |
| private static final StringManager | sm
The string resources for this package. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static Method | Returns: the method instance.the cache used to store method instance methodsCache, Class<?> the class on which the method will be called. targetType, String the method to apply the security restriction methodName, Class<?>[] Class array used to instantiate a Method object.Create the method and cache it for further re-use. |
| public static void | doAsPrivilege(final String
the method to apply the security restriction methodName, final Servlet the targetObject)Servlet on which the method will be called.Perform work as a particular |
| public static void | doAsPrivilege(final String
the method to apply the security restriction methodName, final Servlet the targetObject, final Class<?>[] Servlet on which the method will be called.Class array used to instantiate a Method object.Object array contains the runtime parameters instance.Perform work as a particular |
| public static void | doAsPrivilege(final String
the method to apply the security restriction methodName, final Servlet the targetObject, final Class<?>[] Servlet on which the method will be called.Class array used to instantiate a Method object.Object array contains the runtime parameters instance.the principal)Principal to which the security privilege appliesPerform work as a particular |
| public static void | doAsPrivilege(final String
the method to apply the security restriction methodName, final Filter the targetObject)Filter on which the method will be called.Perform work as a particular |
| public static void | doAsPrivilege(final String
the method to apply the security restriction methodName, final Filter the targetObject, final Class<?>[] Filter on which the method will be called.Class array used to instantiate a Method object.Object array contains the runtime parameters instance.Perform work as a particular |
| public static void | doAsPrivilege(final String
the method to apply the security restriction methodName, final Filter the targetObject, final Class<?>[] Filter on which the method will be called.Class array used to instantiate a Method object.Object array contains the runtime parameters instance.the principal)Principal to which the security privilege appliesPerform work as a particular |
| private static void | execute(final Method
the method to apply the security restriction method, final Object the targetObject, final Object[] Servlet on which the method will be called.Object array contains the runtime parameters instance.the principal)Principal to which the security privilege appliesPerform work as a particular |
| private static Method | Returns: the method instance, null if not yet created.the cache used to store method instance methodsCache, String the method to apply the security restriction methodName)Find a method stored within the cache. |
| public static boolean | Returns: true if package level protection is enabledReturn the |
| public static void |
| classCache | back to summary |
|---|---|
| private static final Map<Class<?>, Method[]> classCache Cache every class for which we are creating methods. | |
| DESTROY | back to summary |
|---|---|
| private static final int DESTROY | |
| DESTROY_METHOD | back to summary |
|---|---|
| private static final String DESTROY_METHOD | |
| DOFILTER | back to summary |
|---|---|
| private static final int DOFILTER | |
| DOFILTER_METHOD | back to summary |
|---|---|
| private static final String DOFILTER_METHOD | |
| DOFILTEREVENT | back to summary |
|---|---|
| private static final int DOFILTEREVENT | |
| DOFILTEREVENT_METHOD | back to summary |
|---|---|
| private static final String DOFILTEREVENT_METHOD | |
| EVENT | back to summary |
|---|---|
| private static final int EVENT | |
| EVENT_METHOD | back to summary |
|---|---|
| private static final String EVENT_METHOD | |
| INIT | back to summary |
|---|---|
| private static final int INIT | |
| INIT_METHOD | back to summary |
|---|---|
| private static final String INIT_METHOD | |
| log | back to summary |
|---|---|
| private static final Log log | |
| packageDefinitionEnabled | back to summary |
|---|---|
| private static final boolean packageDefinitionEnabled | |
| SERVICE | back to summary |
|---|---|
| private static final int SERVICE | |
| SERVICE_METHOD | back to summary |
|---|---|
| private static final String SERVICE_METHOD | |
| sm | back to summary |
|---|---|
| private static final StringManager sm The string resources for this package. | |
| SecurityUtil | back to summary |
|---|---|
| public SecurityUtil() | |
| createMethodAndCacheIt | back to summary |
|---|---|
| private static Method createMethodAndCacheIt(Method[] methodsCache, Class<?> targetType, String methodName, Class<?>[] parameterTypes) throws Exception Create the method and cache it for further re-use. | |
| doAsPrivilege | back to summary |
|---|---|
| public static void doAsPrivilege(final String methodName, final Servlet targetObject) throws Exception Perform work as a particular | |
| doAsPrivilege | back to summary |
|---|---|
| public static void doAsPrivilege(final String methodName, final Servlet targetObject, final Class<?>[] targetType, final Object[] targetArguments) throws Exception Perform work as a particular
| |
| doAsPrivilege | back to summary |
|---|---|
| public static void doAsPrivilege(final String methodName, final Servlet targetObject, final Class<?>[] targetParameterTypes, final Object[] targetArguments, Principal principal) throws Exception Perform work as a particular
| |
| doAsPrivilege | back to summary |
|---|---|
| public static void doAsPrivilege(final String methodName, final Filter targetObject) throws Exception Perform work as a particular | |
| doAsPrivilege | back to summary |
|---|---|
| public static void doAsPrivilege(final String methodName, final Filter targetObject, final Class<?>[] targetType, final Object[] targetArguments) throws Exception Perform work as a particular
| |
| doAsPrivilege | back to summary |
|---|---|
| public static void doAsPrivilege(final String methodName, final Filter targetObject, final Class<?>[] targetParameterTypes, final Object[] targetParameterValues, Principal principal) throws Exception Perform work as a particular
| |
| execute | back to summary |
|---|---|
| private static void execute(final Method method, final Object targetObject, final Object[] targetArguments, Principal principal) throws Exception Perform work as a particular
| |
| findMethod | back to summary |
|---|---|
| private static Method findMethod(Method[] methodsCache, String methodName) Find a method stored within the cache. | |
| isPackageProtectionEnabled | back to summary |
|---|---|
| public static boolean isPackageProtectionEnabled() Return the
| |
| remove | back to summary |
|---|---|
| public static void remove(Object cachedObject) Remove the object from the cache.
| |