|
JSR 217 (Maintenance Release) | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.security.Permission javax.microedition.xlet.ixc.IxcPermission
This class represents access to the inter-xlet communication registry. An IxcPermission consists of a name specification and a set of actions specifying what can be done with those names.
The name specification is the name passed into the IxcRegistry methods such as bind() and lookup(). The names are simple strings; this specification does not impose any special meaning on these strings, such as name canonicalization. Limited wildcarding is allowed at the end of a name string. The name string of length one "*" will match any name. At the end of a string, the special sequence "/*" will match forward-slash followed by any other characters. Otherwise, all characters are simply matched. For example:
The actions to be granted are passed to the constructor in a string containing a list of one or more comma-seperated keywords. The possible keywords are "bind" and "lookup". See the methods on IxcRegistry for a detailed explanation of the meaning of these.
The actions string is converted to lowercase before processing.
IxcRegsitry
Constructor Summary | |
IxcPermission(String name,
String actions)
Creates a new IxcPermission object with the specified name and actions. |
Method Summary | |
boolean |
equals(Object other)
Checks two IxcPermission objects for equality. |
String |
getActions()
Returns the "canonical string representation" of the actions. |
int |
hashCode()
Returns the hash code value for this object. |
boolean |
implies(Permission p)
Checks if this IxcPermission "implies" the specified permission. |
PermissionCollection |
newPermissionCollection()
Returns a new PermissionCollection object for storing IxcPermission objects. |
Methods inherited from class java.security.Permission |
checkGuard, getName, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IxcPermission(String name, String actions)
The actions to be granted are passed to the constructor in a string containing a list of one or more comma-seperated keywords. The possible keywords are "bind" and "lookup". See the methods on IxcRegistry for a detailed explanation of the meaning of these.
The actions string is converted to lowercase before processing.
name
- The name specification for exported/imported objectsactions
- The action stringMethod Detail |
public boolean implies(Permission p)
More specifically, this method returns true if:
implies
in class Permission
p
- the permission to check against
public boolean equals(Object other)
equals
in class Permission
other
- the object we are testing for equality with this object
public int hashCode()
hashCode
in class Permission
public String getActions()
getActions
in class Permission
public PermissionCollection newPermissionCollection()
IxcPermission objects must be stored in a manner that allows them to be inserted into the collection in any order, but that also enables the PermissionCollection implies method to be implemented in an efficient (and consistent) manner.
For example, if you have two IxcPermission objects:
"/1234/*", "lookup"
"/1234/5678/*", "bind"
and you are calling the implies
method with the
IxcPermission:
"/1234/5678/foo",
"bind,lookup"
,
then the implies
method must take into account both the
"/1234/*" and "/1234/5678/*" permissions, so the effective permission
is "bind,lookup" and implies
returns true. The
"implies" semantics for IxcPermissions are handled properly by the
permission collection object returned by this
newPermissionCollection
method.
newPermissionCollection
in class Permission
|
JSR 217 (Maintenance Release) | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |