Class AccessController
AccessController was used with the Security Manager for access
 control operations and decisions. This feature no longer exists.- Since:
- 1.2
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidcheckPermission(Permission perm) Deprecated, for removal: This API element is subject to removal in a future version.ThrowsAccessControlException.static <T> TdoPrivileged(PrivilegedAction<T> action) Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.static <T> TdoPrivileged(PrivilegedAction<T> action, AccessControlContext context) Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.static <T> TdoPrivileged(PrivilegedAction<T> action, AccessControlContext context, Permission... perms) Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.static <T> TdoPrivileged(PrivilegedExceptionAction<T> action) Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.static <T> TdoPrivileged(PrivilegedExceptionAction<T> action, AccessControlContext context) Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.static <T> TdoPrivileged(PrivilegedExceptionAction<T> action, AccessControlContext context, Permission... perms) Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.static <T> TdoPrivilegedWithCombiner(PrivilegedAction<T> action) Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.static <T> TdoPrivilegedWithCombiner(PrivilegedAction<T> action, AccessControlContext context, Permission... perms) Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.static <T> TDeprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.static <T> TdoPrivilegedWithCombiner(PrivilegedExceptionAction<T> action, AccessControlContext context, Permission... perms) Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.static AccessControlContextDeprecated, for removal: This API element is subject to removal in a future version.Returns anAccessControlContextwhere thecheckPermissionmethod always throws anAccessControlExceptionand thegetDomainCombinermethod always returnsnull.
- 
Method Details- 
doPrivilegedDeprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.If the action's runmethod throws an (unchecked) exception, it will propagate through this method.- API Note:
- This method originally performed the specified
     PrivilegedActionwith privileges enabled. Running the action with privileges enabled was only useful in conjunction with the Security Manager, which is no longer supported. This method has been changed to run the action as is, and has equivalent behavior as if there were no Security Manager enabled. There is no replacement for the Security Manager or this method.
- Type Parameters:
- T- the type of the value returned by the PrivilegedAction's- runmethod
- Parameters:
- action- the action to be performed
- Returns:
- the value returned by the action's runmethod
- Throws:
- NullPointerException- if the action is- null
- See Also:
 
- 
doPrivilegedWithCombinerDeprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.If the action's runmethod throws an (unchecked) exception, it will propagate through this method.- API Note:
- This method originally performed the specified
     PrivilegedActionwith privileges enabled and with the current access control context's domain combiner preserved. Running the action with privileges enabled was only useful in conjunction with the Security Manager, which is no longer supported. This method has been changed to run the action as is, and has equivalent behavior as if there were no Security Manager enabled. There is no replacement for the Security Manager or this method.
- Type Parameters:
- T- the type of the value returned by the PrivilegedAction's- runmethod
- Parameters:
- action- the action to be performed
- Returns:
- the value returned by the action's runmethod
- Throws:
- NullPointerException- if the action is- null
- Since:
- 1.6
 
- 
doPrivilegedDeprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.If the action's runmethod throws an (unchecked) exception, it will propagate through this method.- API Note:
- This method originally performed the specified
     PrivilegedActionwith privileges enabled and restricted by the specifiedAccessControlContext. Running the action with privileges enabled was only useful in conjunction with the Security Manager, which is no longer supported. This method has been changed to run the action as is, and has equivalent behavior as if there were no Security Manager enabled. There is no replacement for the Security Manager or this method.
- Type Parameters:
- T- the type of the value returned by the PrivilegedAction's- runmethod
- Parameters:
- action- the action to be performed.
- context- ignored
- Returns:
- the value returned by the action's runmethod
- Throws:
- NullPointerException- if the action is- null
 
- 
doPrivilegedpublic static <T> T doPrivileged(PrivilegedAction<T> action, AccessControlContext context, Permission... perms) Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.If the action's runmethod throws an (unchecked) exception, it will propagate through this method.- API Note:
- This method originally performed the specified
     PrivilegedActionwith privileges enabled and restricted by the specifiedAccessControlContextand with a privilege scope limited by the specifiedPermissionarguments. Running the action with privileges enabled was only useful in conjunction with the Security Manager, which is no longer supported. This method has been changed to run the action as is, and has equivalent behavior as if there were no Security Manager enabled. There is no replacement for the Security Manager or this method.
- Type Parameters:
- T- the type of the value returned by the PrivilegedAction's- runmethod
- Parameters:
- action- the action to be performed
- context- ignored
- perms- ignored
- Returns:
- the value returned by the action's runmethod
- Throws:
- NullPointerException- if action is- null
- Since:
- 1.8
 
- 
doPrivilegedWithCombinerpublic static <T> T doPrivilegedWithCombiner(PrivilegedAction<T> action, AccessControlContext context, Permission... perms) Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.If the action's runmethod throws an (unchecked) exception, it will propagate through this method.- API Note:
- This method originally performed the specified
     PrivilegedActionwith privileges enabled and restricted by the specifiedAccessControlContextand with a privilege scope limited by the specifiedPermissionarguments. This method also originally preserved the current access control context's domain combiner while the action was performed. Running the action with privileges enabled was only useful in conjunction with the Security Manager, which is no longer supported. This method has been changed to run the action as is, and has equivalent behavior as if there were no Security Manager enabled. There is no replacement for the Security Manager or this method.
- Type Parameters:
- T- the type of the value returned by the PrivilegedAction's- runmethod
- Parameters:
- action- the action to be performed
- context- ignored
- perms- ignored
- Returns:
- the value returned by the action's runmethod
- Throws:
- NullPointerException- if action is- null
- Since:
- 1.8
 
- 
doPrivilegedpublic static <T> T doPrivileged(PrivilegedExceptionAction<T> action) throws PrivilegedActionException Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.If the action's runmethod throws an unchecked exception, it will propagate through this method.- API Note:
- This method originally performed the specified
     PrivilegedExceptionActionwith privileges enabled. Running the action with privileges enabled was only useful in conjunction with the Security Manager, which is no longer supported. This method has been changed to run the action as is, and has equivalent behavior as if there were no Security Manager enabled. There is no replacement for the Security Manager or this method.
- Type Parameters:
- T- the type of the value returned by the PrivilegedExceptionAction's- runmethod
- Parameters:
- action- the action to be performed
- Returns:
- the value returned by the action's runmethod
- Throws:
- PrivilegedActionException- if the specified action's- runmethod threw a checked exception
- NullPointerException- if the action is- null
 
- 
doPrivilegedWithCombinerpublic static <T> T doPrivilegedWithCombiner(PrivilegedExceptionAction<T> action) throws PrivilegedActionException Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.If the action's runmethod throws an unchecked exception, it will propagate through this method.- API Note:
- This method originally performed the specified
     PrivilegedExceptionActionwith privileges enabled and with the current access control context's domain combiner preserved. Running the action with privileges enabled was only useful in conjunction with the Security Manager, which is no longer supported. This method has been changed to run the action as is, and has equivalent behavior as if there were no Security Manager enabled. There is no replacement for the Security Manager or this method.
- Type Parameters:
- T- the type of the value returned by the PrivilegedExceptionAction's- runmethod
- Parameters:
- action- the action to be performed
- Returns:
- the value returned by the action's runmethod
- Throws:
- PrivilegedActionException- if the specified action's- runmethod threw a checked exception
- NullPointerException- if the action is- null
- Since:
- 1.6
 
- 
doPrivilegedpublic static <T> T doPrivileged(PrivilegedExceptionAction<T> action, AccessControlContext context) throws PrivilegedActionException Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.If the action's runmethod throws an unchecked exception, it will propagate through this method.- API Note:
- This method originally performed the specified
     PrivilegedExceptionActionwith privileges enabled and restricted by the specifiedAccessControlContext. Running the action with privileges enabled was only useful in conjunction with the Security Manager, which is no longer supported. This method has been changed to run the action as is, and has equivalent behavior as if there were no Security Manager enabled. There is no replacement for the Security Manager or this method.
- Type Parameters:
- T- the type of the value returned by the PrivilegedExceptionAction's- runmethod
- Parameters:
- action- the action to be performed
- context- ignored
- Returns:
- the value returned by the action's runmethod
- Throws:
- PrivilegedActionException- if the specified action's- runmethod threw a checked exception
- NullPointerException- if the action is- null
- See Also:
 
- 
doPrivilegedpublic static <T> T doPrivileged(PrivilegedExceptionAction<T> action, AccessControlContext context, Permission... perms) throws PrivilegedActionException Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.If the action's runmethod throws an (unchecked) exception, it will propagate through this method.- API Note:
- This method originally performed the specified
     PrivilegedExceptionActionwith privileges enabled and restricted by the specifiedAccessControlContextand with a privilege scope limited by the specifiedPermissionarguments. Running the action with privileges enabled was only useful in conjunction with the Security Manager, which is no longer supported. This method has been changed to run the action as is, and has equivalent behavior as if there were no Security Manager enabled. There is no replacement for the Security Manager or this method.
- Type Parameters:
- T- the type of the value returned by the PrivilegedExceptionAction's- runmethod
- Parameters:
- action- the action to be performed
- context- ignored
- perms- ignored
- Returns:
- the value returned by the action's runmethod
- Throws:
- PrivilegedActionException- if the specified action's- runmethod threw a checked exception
- NullPointerException- if action is- null
- Since:
- 1.8
 
- 
doPrivilegedWithCombinerpublic static <T> T doPrivilegedWithCombiner(PrivilegedExceptionAction<T> action, AccessControlContext context, Permission... perms) throws PrivilegedActionException Deprecated, for removal: This API element is subject to removal in a future version.Performs the specified action.If the action's runmethod throws an (unchecked) exception, it will propagate through this method.- API Note:
- This method originally performed the specified
     PrivilegedExceptionActionwith privileges enabled and restricted by the specifiedAccessControlContextand with a privilege scope limited by the specifiedPermissionarguments. This method also preserved the current access control context's domain combiner while the action was performed. Running the action with privileges enabled was only useful in conjunction with the Security Manager, which is no longer supported. This method has been changed to run the action as is, and has equivalent behavior as if there were no Security Manager enabled. There is no replacement for the Security Manager or this method.
- Type Parameters:
- T- the type of the value returned by the PrivilegedExceptionAction's- runmethod
- Parameters:
- action- the action to be performed
- context- ignored
- perms- ignored
- Returns:
- the value returned by the action's runmethod
- Throws:
- PrivilegedActionException- if the specified action's- runmethod threw a checked exception
- NullPointerException- if action is- null
- Since:
- 1.8
 
- 
getContextDeprecated, for removal: This API element is subject to removal in a future version.Returns anAccessControlContextwhere thecheckPermissionmethod always throws anAccessControlExceptionand thegetDomainCombinermethod always returnsnull.- API Note:
- This method originally returned a snapshot of the current
       calling context, which included the current thread's access
       control context and any limited privilege scope. This method has
       been changed to always return an innocuous
       AccessControlContextthat fails all permission checks. This method was only useful in conjunction with the Security Manager, which is no longer supported. There is no replacement for the Security Manager or this method.
- Returns:
- an AccessControlContextas specified above
- See Also:
 
- 
checkPermissionDeprecated, for removal: This API element is subject to removal in a future version.ThrowsAccessControlException.- API Note:
- This method originally determined whether the access request
       indicated by the specified permission should be allowed or denied,
       based on the current AccessControlContextand security policy. This method has been changed to always throwAccessControlException. This method was only useful in conjunction with the Security Manager, which is no longer supported. There is no replacement for the Security Manager or this method.
- Parameters:
- perm- ignored
- Throws:
- AccessControlException- always
 
 
-