Spec-Zone .ru
спецификации, руководства, описания, API
|
|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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,
PermissionCollection permissions)
Creates a new ProtectionDomain with the given CodeSource and Permissions. |
Method Summary | |
CodeSource |
getCodeSource()
Returns the CodeSource of this domain. |
PermissionCollection |
getPermissions()
Returns the permissions of this domain. |
boolean |
implies(Permission permission)
Check and see if this ProtectionDomain implies the permissions expressed in the Permission object. |
String |
toString()
Convert a ProtectionDomain to a String. |
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)
setReadOnly()
will be called on the passed in
Permissions object.codesource
- the codesource associated with this domainpermissions
- the permissions granted to this domainMethod Detail |
public final CodeSource getCodeSource()
public final PermissionCollection getPermissions()
public boolean implies(Permission permission)
permission
- the Permission object to check.public String toString()
|
JavaTM 2 Platform Standard Edition |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |