|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.security.ProtectionDomain
public class ProtectionDomain
This class represents a domain in which classes from the same source (URL) and signed by the same keys are stored. All the classes inside are given the same permissions.
Note: a class can only belong to one and only one protection domain.
| Constructor Summary | |
|---|---|
ProtectionDomain(CodeSource codesource,
PermissionCollection permissions)
Contructs a protection domain from the given code source and the permissions that that should be granted to the classes which are encapsulated in it. |
|
ProtectionDomain(CodeSource codesource,
PermissionCollection permissions,
ClassLoader classloader,
Principal[] principals)
Contructs a protection domain from the given code source and the permissions. |
|
| Method Summary | |
|---|---|
ClassLoader |
getClassLoader()
Returns the ClassLoader associated with the ProtectionDomain |
CodeSource |
getCodeSource()
Answers the code source of this domain. |
PermissionCollection |
getPermissions()
Answers the permissions that should be granted to the classes which are encapsulated in this domain. |
Principal[] |
getPrincipals()
Returns the Principals associated with this ProtectionDomain. |
boolean |
implies(Permission perm)
Determines whether the permission collection of this domain implies the argument permission. |
String |
toString()
Answers a string containing a concise, human-readable description of the receiver. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ProtectionDomain(CodeSource codesource,
PermissionCollection permissions)
codesource - the CodeSource associated with this domainpermissions - the Permissions associated with this domainCodeSource,
PermissionCollectionpublic ProtectionDomain(CodeSource codesource,
PermissionCollection permissions,
ClassLoader classloader,
Principal[] principals)
codesource - the CodeSource associated with this domainpermissions - the Permissions associated with this domainclassloader - the ClassLoader associated with this domainprincipals - the Principals associated with this domainCodeSource,
PermissionCollection,
Principal| Method Detail |
|---|
public final CodeSource getCodeSource()
public final PermissionCollection getPermissions()
public final Principal[] getPrincipals()
public final ClassLoader getClassLoader()
public boolean implies(Permission perm)
perm - java.security.Permission
the permission to check.
public String toString()
toString in class Object
|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||