Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----java.security.ProtectionDomain
This ProtectionDomain class encapulates the characteristics of a domain, which encloses a set of classes whose instances are granted the same set of permissions.
In addition to a set of permissions, a domain is comprised of a CodeSource, which is a set of PublicKeys together with a codebase (in the form of a URL). Thus, classes signed by the same keys and from the same URL are placed in the same domain. Classes that have the same permissions but are from different code sources belong to different domains.
A class belongs to one and only one ProtectionDomain.
Constructor Summary | |
ProtectionDomain(CodeSource codesource,
Permissions permissions)
|
Method Summary | |
CodeSource | getCodeSource()
|
Permissions | getPermissions()
|
boolean | implies(Permission permission)
|
String | toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProtectionDomain(CodeSource codesource, Permissions permissions)
setReadOnly()
will be called on the passed in
Permissions object.
codesource
- the codesource associated with this domain
permissions
- the permissions granted to this domain
Method Detail |
public final CodeSource getCodeSource()
public final Permissions getPermissions()
public boolean implies(Permission permission)
permission
- the Permission object to check.
public String toString()
Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |