|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.security.AccessController
@TransactionType(value=NOT_SUPPORTED) public final class AccessController
The AccessController class is used for access control operations and decisions.
More specifically, the AccessController class is used to decide whether an access to a critical system resource is to be allowed or denied, based on the security policy currently in effect.
The checkPermission
method determines
whether the access request indicated by a specified permission should be
granted or denied. A sample call appears below. In this example,
checkPermission
will determine whether or not to grant "read"
access to the file named "testFile" in the "/temp" directory.
ConnectorPermission perm = new ConnectorPermission("file:///temp/testFile", "read"); AccessController.checkPermission(perm);
If a requested access is allowed, checkPermission
returns
quietly. If denied, an AccessControlException is thrown.
AccessControlException can also be thrown if the requested permission is of
an incorrect type or contains an invalid value. Such information is given
whenever possible.
This Java Card class is a subset of the CDC 1.1 AccessController class. Some interfaces, methods and/or variables have been pruned, and/or other methods simplified, in an effort to reduce the size of this class and/or eliminate dependencies on unsupported features.
Method Summary | |
---|---|
static void |
checkPermission(Permission perm)
Determines whether the access request indicated by the specified permission should be allowed or denied, based on the security policy currently in effect. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void checkPermission(Permission perm) throws AccessControlException
perm
- the requested permission.
AccessControlException
- if the specified permission is not permitted, based on the
current security policy.
NullPointerException
- if the specified permission is null
and is
checked based on the security policy currently in effect.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |