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
ConstructorsConstructorDescriptionSharedClassPermission(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 TypeMethodDescriptionbooleanCompares the argument to the receiver, and answerstrueif they represent the same object using a class specific comparison.Answers the actions associated with the receiver.inthashCode()Answers the integer hash code for the receiver.booleanimplies(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 answerstrueif 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:
equalsin classBasicPermission- Parameters:
o- the object to compare with this object- Returns:
- boolean
trueif the object is the same as this object,falseif it is different from this object - See Also:
-
newPermissionCollection
Answers a new PermissionCollection for holding permissions of this class.- Overrides:
newPermissionCollectionin classBasicPermission- Returns:
- a new PermissionCollection
- See Also:
-
hashCode
public int hashCode()Answers the integer hash code for the receiver.Any two objects which answer
truewhen passed toequalsmust answer the same value for this method.- Overrides:
hashCodein 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:
getActionsin classBasicPermission- Returns:
- String the actions associated with the receiver
-
implies
Indicates whether the argument permission is implied by the receiver.- Overrides:
impliesin classBasicPermission- Parameters:
permission- Permission the permission to check- Returns:
- boolean
trueif the argument permission is implied by the receiver, andfalseif it is not
-