public class PermissionCacheFactory extends Object
Constructor and Description |
---|
PermissionCacheFactory() |
Modifier and Type | Method and Description |
---|---|
static PermissionCache |
createPermissionCache(String pcID,
CodeSource codesource,
Class clazz,
String name)
Create a PermissionCache object.
|
static PermissionCache |
createPermissionCache(String pcID,
CodeSource codesource,
Permission[] perms,
String name)
Create a PermissionCache object.
|
static PermissionCache |
removePermissionCache(PermissionCache cache) |
static void |
resetCaches()
This resets all caches inside the factory.
|
public static PermissionCache createPermissionCache(String pcID, CodeSource codesource, Permission[] perms, String name)
pcID
- - a string identifying the policy context and which must be set when getPermissions is called
(internally). This value may be null, in which case the permisions of the default policy context will be cached.codesource
- - the codesource argument to be used in the call to getPermissions. This value may be null.perms
- - an array of Permission objects identifying the permission types that will be managed by the cache.
This value may be null, in which case all permissions obtained by the getPermissions call will be cached.name
- - a string corresponding to a value returned by Permission.getName() only permissions whose getName()
value matches the name parameter will be included in the cache. This value may be null, in which case permission name
dos not factor into the permission caching.public static PermissionCache createPermissionCache(String pcID, CodeSource codesource, Class clazz, String name)
pcID
- - a string identifying the policy context and which must be set when getPermissions is called
(internally). This value may be null, in which case the permisions of the default policy context will be cached.codesource
- - the codesource argument to be used in the call to getPermissions. This value may be null.clazz
- - a class object identifying the permission type that will be managed by the cache. This value may be
null, in which case all permissions obtained by the getPermissions call will be cached.name
- - a string corresponding to a value returned by Permission.getName() only permissions whose getName()
value matches the name parameter will be included in the cache. This value may be null, in which case permission name
dos not factor into the permission caching.public static PermissionCache removePermissionCache(PermissionCache cache)
public static void resetCaches()
Copyright © 2021. All rights reserved.