- 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.policy
file. 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 boolean
equals(Object o)
Compares the argument to the receiver, and answerstrue
if they represent the same object using a class specific comparison.String
getActions()
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.PermissionCollection
newPermissionCollection()
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 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:
hashCode()
-
newPermissionCollection
public PermissionCollection newPermissionCollection()
Answers a new PermissionCollection for holding permissions of this class.- Overrides:
newPermissionCollection
in 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
true
when passed toequals
must answer the same value for this method.- Overrides:
hashCode
in 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:
getActions
in 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:
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
-
-