|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.security.Permission com.ibm.websphere.objectgrid.security.AgentPermission
public final class AgentPermission
This class represents permissions to the datagrid agents.
The name of the agent permission is the full map name. A full Map name is a concatenation of the ObjectGrid name, a period, and then the Map name. For example, if the object grid name is "myobjectgrid" and the map name is "mymap", then the full map name used in the permission is "myobjectgrid.mymap".
The action of the permission is a "," delimited string of agent implementation class names or package names. For example, if your agent implementation class name is "com.acme.agent.EntryAgentImpl", then the agent with implementation class com.acme.agent.EntryAgentImpl is authorized. If the permission action is "com.acme.agent.*", then all agents with implemention class belonging to the com.acme.agent package are authorized. You can use "," to separate classes or packages in the action string, for example, "com.acme.agent.EntryAgentImpl,com.acme.agent2.*".
Wildcards can be used in map name with some restrictions. A wild card "*" can be used to replace the map name or the object grid name, but not partially. For example, "myObjectGrid.*", "*.myMap", and "*.*" are valid names, but "myObject*.*" is not valid.
Permission
,
Serialized FormConstructor Summary | |
---|---|
AgentPermission(String name,
String actions)
Constructs a new AgentPermission for the named map with the specified actions. |
|
AgentPermission(String ogName,
String mapName,
String actions)
Constructs a new AgentPermission for the named map with the specified actions. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Checks two AgentPermission objects for equality. |
String |
getActions()
Returns the actions as a String. |
String[] |
getParsedNames()
Returns an array which contains the ObjectGrid name and map name. |
int |
hashCode()
Returns the hash code value for this AgentPermission object. |
boolean |
implies(Permission permission)
Checks if the specified permission is "implied" by this object. |
Methods inherited from class java.security.Permission |
---|
checkGuard, getName, newPermissionCollection, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AgentPermission(String name, String actions)
The map name for this permission should be in the format of <ObjectGrid name>.<map name>, for example "og1.map1". A special value of "*" is used to represent all objectgrids or all maps, for example "*.map1", "og1.*", or "*.*". A "*" is used to substitue a whole ObjectGrid name or map name. A partial substitution like "og*.map" is not supported.
name
- the full name of the map. It is also the permission name.actions
- the comma separated list of agent classes or packages, such as
"com.acme.EntryAgentImpl,com.acme.ReduceAgentImpl,com.acme.actions.*".
IllegalArgumentException
- if name is null
or malformed
or if actions is null
.public AgentPermission(String ogName, String mapName, String actions)
This method is used for the ObjectGrid map of which the ObjectGrid name or map name contains a ".". In this case, we pass the ObjectGrid name and map name separately as the parameters.
ObjectGrid uses <ObjectGrid name>.<map name> as the permission name. Therefore, your application still needs to make sure there is no name conflicts for the <ObjectGrid name>.<map name>. For example, you should not have an ObjectGrid with name "og" and one of its maps with name "session.data", and another ObjectGrid with name "og.session" and one of its maps with name "data".
ogName
- the ObjectGrid name.mapName
- the map name.actions
- the comma separated list of agent classes or packages, such as
"com.acme.EntryAgentImpl,com.acme.ReduceAgentImpl,com.acme.actions.*".
IllegalArgumentException
- if ObjectGrid name or map name is null
or if actions is null
or contains an invalidate
action nameMethod Detail |
---|
public boolean implies(Permission permission)
More specifically, this method returns true if:
implies
in class Permission
permission
- the permission to check against.
public boolean equals(Object o)
Do not use the equals
method for making access control
decisions; use the implies
method.
equals
in class Permission
o
- the object we are testing for equality with this object.
true
if both AgentPermission objects are equivalent.public int hashCode()
hashCode
in class Permission
public String getActions()
getActions
in class Permission
public String[] getParsedNames()
|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |