|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.freshcookies.security.policy.LocalPolicy.LocalProtectionDomain
public static class LocalPolicy.LocalProtectionDomain
Lightweight re-implementation of ProtectionDomain
that does not allow subsequent modifications to Permissions. The default
ProtectionDomain is, unfortunately, unsuitable for use with LocalPolicy
because default JVM permissions are added "dynamically" subsequent to
creation. This class exhibits the same basic behaviors as
ProtectionDomain: null
values are allowed for the
LocalProtectionDomain's Principals, CodeSource and PermissionCollection.
Also, if the Principal array supplied is null
, it will be
converted to a zero-length array.
Constructor Summary | |
---|---|
LocalPolicy.LocalProtectionDomain(java.security.CodeSource codesource,
java.security.PermissionCollection permissions,
java.lang.ClassLoader classloader,
java.security.Principal[] principals)
Constructs a new LocalProtectionDomain. |
Method Summary | |
---|---|
java.lang.ClassLoader |
getClassLoader()
Returns the ClassLoader used to construct the LocalProtectionDomain, which may be null . |
java.security.CodeSource |
getCodeSource()
Returns the CodeSource used to construct the LocalProtectionDomain, which may be null . |
java.security.PermissionCollection |
getPermissions()
Returns the PermissionCollection used to construct the LocalProtectionDomain, which may be null . |
java.security.Principal[] |
getPrincipals()
Returns the Principal array used to construct the LocalProtectionDomain, if supplied, or a zero-length array if not supplied. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalPolicy.LocalProtectionDomain(java.security.CodeSource codesource, java.security.PermissionCollection permissions, java.lang.ClassLoader classloader, java.security.Principal[] principals)
codesource
- the code source; may be null
permissions
- the permission collection; may be null
principals
- the principals to whom the permissions are granted; may be
null
Method Detail |
---|
public java.lang.ClassLoader getClassLoader()
null
.
public java.security.CodeSource getCodeSource()
null
.
public java.security.PermissionCollection getPermissions()
null
.
public java.security.Principal[] getPrincipals()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |