| java.lang.Object java.security.ProtectionDomain
ProtectionDomain | public class ProtectionDomain (Code) | | 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.
|
ProtectionDomain | public ProtectionDomain(CodeSource cs, PermissionCollection permissions)(Code) | | Constructs a protection domain from the given code source and the
permissions that that should be granted to the classes which are
encapsulated in it.
Parameters: cs - Parameters: permissions - |
ProtectionDomain | public ProtectionDomain(CodeSource cs, PermissionCollection permissions, ClassLoader cl, Principal[] principals)(Code) | | Constructs a protection domain from the given code source and the
permissions that that should be granted to the classes which are
encapsulated in it.
This constructor also allows the association of a ClassLoader and group
of Principals.
Parameters: cs - the CodeSource associated with this domain Parameters: permissions - the Permissions associated with this domain Parameters: cl - the ClassLoader associated with this domain Parameters: principals - the Principals associated with this domain |
getClassLoader | final public ClassLoader getClassLoader()(Code) | | Returns the ClassLoader associated with the ProtectionDomain
ClassLoader associated ClassLoader |
getCodeSource | final public CodeSource getCodeSource()(Code) | | Answers the code source of this domain.
java.security.CodeSource the code source of this domain |
getPermissions | final public PermissionCollection getPermissions()(Code) | | Answers the permissions that should be granted to the classes which are
encapsulated in this domain.
java.security.PermissionCollection collection of permissionsassociated with this domain. |
getPrincipals | final public Principal[] getPrincipals()(Code) | | Returns the Principals associated with this ProtectionDomain. A change to
the returned array will not impact the ProtectionDomain.
Principals[] Principals associated with the ProtectionDomain. |
implies | public boolean implies(Permission permission)(Code) | | Determines whether the permission collection of this domain implies the
argument permission.
boolean true if this permission collection implies the argumentand false otherwise. Parameters: permission - java.security.Permission the permission to check. |
toString | public String toString()(Code) | | Answers a string containing a concise, human-readable description of the
receiver.
String a printable representation for the receiver. |
|
|