java.lang.Object
java.security.Permission
java.security.BasicPermission
com.ibm.oti.shared.SharedClassPermission
- All Implemented Interfaces:
Serializable
,Guard
SharedClassPermission provides security permission to govern ClassLoader access to the shared class cache.
Usage:
To grant permission to a ClassLoader, add permission in the java.policy
file.
For example,
com.ibm.oti.shared.SharedClassPermission "classloaders.myClassLoader", "read,write";
Possible actions are:
- "read" allows a ClassLoader to load classes from the shared cache
- "write" allows a ClassLoader to add classes to the shared cache
- See Also:
-
Constructor Summary
ConstructorDescriptionSharedClassPermission
(ClassLoader loader, String actions) Constructs a new instance of this class.SharedClassPermission
(String classLoaderClassName, String actions) Constructs a new instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the argument to the receiver, and answerstrue
if they represent the same object using a class specific comparison.Answers the actions associated with the receiver.int
hashCode()
Answers the integer hash code for the receiver.boolean
implies
(Permission permission) Indicates whether the argument permission is implied by the receiver.Answers a new PermissionCollection for holding permissions of this class.Methods declared in class java.security.Permission
checkGuard, getName, toString
-
Constructor Details
-
SharedClassPermission
Constructs a new instance of this class.- Parameters:
loader
- ClassLoader the ClassLoader requiring the permissionactions
- String the actions which are applicable to it
-
SharedClassPermission
Constructs a new instance of this class.- Parameters:
classLoaderClassName
- String the name of the ClassLoader class requiring the permissionactions
- String the actions which are applicable to it
-
-
Method Details
-
equals
Compares the argument to the receiver, and answerstrue
if they represent the same object using a class specific comparison.In this case, the receiver must be for the same property as the argument, and must have the same actions.
- Overrides:
equals
in classBasicPermission
- Parameters:
o
- the object to compare with this object- Returns:
- boolean
true
if the object is the same as this object,false
if it is different from this object - See Also:
-
newPermissionCollection
Answers a new PermissionCollection for holding permissions of this class.- Overrides:
newPermissionCollection
in classBasicPermission
- Returns:
- a new PermissionCollection
- See Also:
-
hashCode
public int hashCode()Answers the integer hash code for the receiver.Any two objects which answer
true
when passed toequals
must answer the same value for this method.- Overrides:
hashCode
in classBasicPermission
- Returns:
- the receiver's hash code
- See Also:
-
getActions
Answers the actions associated with the receiver.The result will be either "read", "write", or "read,write".
- Overrides:
getActions
in classBasicPermission
- Returns:
- String the actions associated with the receiver
-
implies
Indicates whether the argument permission is implied by the receiver.- Overrides:
implies
in classBasicPermission
- Parameters:
permission
- Permission the permission to check- Returns:
- boolean
true
if the argument permission is implied by the receiver, andfalse
if it is not
-