- java.lang.Object
-
- java.security.Permission
-
- java.security.BasicPermission
-
- com.ibm.oti.shared.SharedClassPermission
-
- All Implemented Interfaces:
Serializable,Guard
public class SharedClassPermission extends BasicPermission
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.policyfile. For example,
Possible actions are:com.ibm.oti.shared.SharedClassPermission "classloaders.myClassLoader", "read,write";- "read" allows a ClassLoader to load classes from the shared cache
- "write" allows a ClassLoader to add classes to the shared cache
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SharedClassPermission(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Compares the argument to the receiver, and answerstrueif they represent the same object using a class specific comparison.StringgetActions()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.PermissionCollectionnewPermissionCollection()Answers a new PermissionCollection for holding permissions of this class.-
Methods declared in class java.security.Permission
checkGuard, getName, toString
-
-
-
-
Constructor Detail
-
SharedClassPermission
public SharedClassPermission(ClassLoader loader, String actions)
Constructs a new instance of this class.- Parameters:
loader- ClassLoader the ClassLoader requiring the permissionactions- String the actions which are applicable to it
-
-
Method Detail
-
equals
public boolean equals(Object o)
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:
hashCode()
-
newPermissionCollection
public PermissionCollection newPermissionCollection()
Answers a new PermissionCollection for holding permissions of this class.- Overrides:
newPermissionCollectionin classBasicPermission- Returns:
- a new PermissionCollection
- See Also:
PermissionCollection
-
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:
equals(java.lang.Object)
-
getActions
public String 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
public boolean implies(Permission permission)
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
-
-