|
CLDC 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.security.Permission
java.security.BasicPermission
java.lang.RuntimePermission
This class is for runtime permissions. A RuntimePermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.
The target name is the name of the runtime permission (see below). The naming convention follows the hierarchical property naming convention. Also, an asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "target.*" or "*" is valid, "*target" or "a*b" is not valid.
The following table lists all the possible RuntimePermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.
Permission Target Name | What the Permission Allows | Risks of Allowing this Permission |
---|---|---|
exitVM | Halting of the Java Virtual Machine | This allows an attacker to mount a denial-of-service attack by automatically forcing the virtual machine to halt. |
modifyThread | Modification of threads, e.g., via calls to Thread
interrupt and setPriority methods |
This allows an attacker to modify the behavior of any thread in the system. |
BasicPermission
,
Permission
,
PermissionCollection
Constructor Summary | |
RuntimePermission(String name)
Creates a new RuntimePermission with the specified name. |
|
RuntimePermission(String name,
String actions)
Creates a new RuntimePermission object with the specified name. |
Methods inherited from class java.security.BasicPermission |
equals, getActions, hashCode, implies, newPermissionCollection |
Methods inherited from class java.security.Permission |
getName, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RuntimePermission(String name)
name
- the name of the RuntimePermission.
NullPointerException
- if name
is null
.
IllegalArgumentException
- if name
is empty.public RuntimePermission(String name, String actions)
name
- the name of the RuntimePermission.actions
- should be null.
NullPointerException
- if name
is null
.
IllegalArgumentException
- if name
is empty
|
CLDC 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |