Class AccessController
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckPermission(Permission perm) Deprecated, for removal: This API element is subject to removal in a future version.Throws AccessControlExceptionstatic <T> TdoPrivileged(PrivilegedAction<T> action) Deprecated, for removal: This API element is subject to removal in a future version.Performs the privileged action specified byaction.static <T> TdoPrivileged(PrivilegedAction<T> action, AccessControlContext context) Deprecated, for removal: This API element is subject to removal in a future version.Performs the privileged action specified byaction.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 privileged action specified byaction.static <T> TdoPrivileged(PrivilegedExceptionAction<T> action) Deprecated, for removal: This API element is subject to removal in a future version.Performs the privileged action specified byaction.static <T> TdoPrivileged(PrivilegedExceptionAction<T> action, AccessControlContext context) Deprecated, for removal: This API element is subject to removal in a future version.Performs the privileged action specified byaction.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 privileged action specified byaction.static <T> TdoPrivilegedWithCombiner(PrivilegedAction<T> action) Deprecated, for removal: This API element is subject to removal in a future version.Performs the privileged action specified byaction, retaining any current DomainCombiner.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 privileged action specified byaction, retaining any current DomainCombiner.static <T> TDeprecated, for removal: This API element is subject to removal in a future version.Performs the privileged action specified byaction, retaining any current DomainCombiner.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 privileged action specified byaction, retaining any current DomainCombiner.static AccessControlContextDeprecated, for removal: This API element is subject to removal in a future version.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Method Details
-
checkPermission
Deprecated, for removal: This API element is subject to removal in a future version.Throws AccessControlException- Parameters:
perm- is ignored- Throws:
AccessControlException- is always thrown
-
getContext
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- an AccessControlContext with no permissions
-
doPrivileged
Deprecated, for removal: This API element is subject to removal in a future version.Performs the privileged action specified byaction.When permission checks are made, if the permission has been granted by all frames below and including the one representing the call to this method, then the permission is granted. In other words, the check stops here. Any unchecked exception generated by this method will propagate up the chain.
- Type Parameters:
T- the type of value returned by PrivilegedAction.run- Parameters:
action- The PrivilegedAction to performed- Returns:
- the result of the PrivilegedAction
- Throws:
NullPointerException- if action is null- See Also:
-
doPrivileged
Deprecated, for removal: This API element is subject to removal in a future version.Performs the privileged action specified byaction.When permission checks are made, if the permission has been granted by all frames below and including the one representing the call to this method, then the permission is granted iff it is granted by the AccessControlContext
context. In other words, no more checking of the current stack is performed. Instead, the passed in context is checked. Any unchecked exception generated by this method will propagate up the chain.- Type Parameters:
T- the type of value returned by PrivilegedAction.run- Parameters:
action- The PrivilegedAction to performedcontext- The AccessControlContext to check- Returns:
- the result of the PrivilegedAction
- Throws:
NullPointerException- if action is null- See Also:
-
doPrivileged
public 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 privileged action specified byaction.When permission checks are made, if the permission has been granted by all frames below and including the one representing the call to this method, then the permission is granted. In other words, the check stops here. Any unchecked exception generated by this method will propagate up the chain. However, checked exceptions will be caught an re-thrown as PrivilegedActionExceptions
- Type Parameters:
T- the type of value returned by PrivilegedExceptionAction.run- Parameters:
action- The PrivilegedExceptionAction to performed- Returns:
- the result of the PrivilegedExceptionAction
- Throws:
PrivilegedActionException- when a checked exception occurs when performing the action NullPointerException if action is null- See Also:
-
doPrivileged
public 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 privileged action specified byaction.When permission checks are made, if the permission has been granted by all frames below and including the one representing the call to this method, then the permission is granted iff it is granted by the AccessControlContext
context. In other words, no more checking of the current stack is performed. Instead, the passed in context is checked. Any unchecked exception generated by this method will propagate up the chain. However, checked exceptions will be caught an re-thrown as PrivilegedActionExceptions- Type Parameters:
T- the type of value returned by PrivilegedExceptionAction.run- Parameters:
action- The PrivilegedExceptionAction to performedcontext- The AccessControlContext to check- Returns:
- the result of the PrivilegedExceptionAction
- Throws:
PrivilegedActionException- when a checked exception occurs when performing the action NullPointerException if action is null- See Also:
-
doPrivilegedWithCombiner
Deprecated, for removal: This API element is subject to removal in a future version.Performs the privileged action specified byaction, retaining any current DomainCombiner.When permission checks are made, if the permission has been granted by all frames below and including the one representing the call to this method, then the permission is granted. In other words, the check stops here. Any unchecked exception generated by this method will propagate up the chain.
- Type Parameters:
T- the type of value returned by PrivilegedAction.run- Parameters:
action- The PrivilegedAction to performed- Returns:
- the result of the PrivilegedAction
- See Also:
-
doPrivilegedWithCombiner
public 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 privileged action specified byaction, retaining any current DomainCombiner.When permission checks are made, if the permission has been granted by all frames below and including the one representing the call to this method, then the permission is granted. In other words, the check stops here. Any unchecked exception generated by this method will propagate up the chain. However, checked exceptions will be caught an re-thrown as PrivilegedActionExceptions
- Type Parameters:
T- the type of value returned by PrivilegedExceptionAction.run- Parameters:
action- The PrivilegedExceptionAction to performed- Returns:
- the result of the PrivilegedExceptionAction
- Throws:
PrivilegedActionException- when a checked exception occurs when performing the action- See Also:
-
doPrivileged
public 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 privileged action specified byaction.When permission checks are made, if the permission has been granted by all frames below and including the one representing the call to this method, then the permission is granted iff it is granted by the AccessControlContext
contextand also granted by one of the permissions arguments. Any unchecked exception generated by this method will propagate up the chain.- Type Parameters:
T- the type of value returned by PrivilegedAction.run- Parameters:
action- The PrivilegedAction to performedcontext- The AccessControlContext to checkperms- The Permission arguments to limit the scope of the caller's privileges.- Returns:
- the result of the PrivilegedAction
- Throws:
NullPointerException- if action is null- Since:
- 1.8
- See Also:
-
doPrivilegedWithCombiner
public 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 privileged action specified byaction, retaining any current DomainCombiner.When permission checks are made, if the permission has been granted by all frames below and including the one representing the call to this method, then the permission is granted iff it is granted by one of the permissions arguments. Any unchecked exception generated by this method will propagate up the chain.
- Type Parameters:
T- the type of value returned by PrivilegedAction.run- Parameters:
action- The PrivilegedAction to performedcontext- The AccessControlContext to checkperms- The Permission arguments to limit the scope of the caller's privileges.- Returns:
- the result of the PrivilegedAction
- Since:
- 1.8
- See Also:
-
doPrivileged
public 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 privileged action specified byaction.When permission checks are made, if the permission has been granted by all frames below and including the one representing the call to this method, then the permission is granted iff it is granted by the AccessControlContext
contextand also granted by one of the permissions arguments. Any unchecked exception generated by this method will propagate up the chain. However, checked exceptions will be caught an re-thrown as PrivilegedActionExceptions- Type Parameters:
T- the type of value returned by PrivilegedExceptionAction.run- Parameters:
action- The PrivilegedExceptionAction to performedcontext- The AccessControlContext to checkperms- The Permission arguments to limit the scope of the caller's privileges.- Returns:
- the result of the PrivilegedExceptionAction
- Throws:
PrivilegedActionException- when a checked exception occurs when performing the action NullPointerException if action is null- Since:
- 1.8
- See Also:
-
doPrivilegedWithCombiner
public 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 privileged action specified byaction, retaining any current DomainCombiner.When permission checks are made, if the permission has been granted by all frames below and including the one representing the call to this method, then the permission is granted and also granted by one of the permissions arguments. Any unchecked exception generated by this method will propagate up the chain. However, checked exceptions will be caught an re-thrown as PrivilegedActionExceptions
- Type Parameters:
T- the type of value returned by PrivilegedExceptionAction.run- Parameters:
action- The PrivilegedExceptionAction to performedcontext- The AccessControlContext to checkperms- The Permission arguments to limit the scope of the caller's privileges.- Returns:
- the result of the PrivilegedExceptionAction
- Throws:
PrivilegedActionException- when a checked exception occurs when performing the action- Since:
- 1.8
- See Also:
-