? WirePermission
java.lang.Object
java.security.Permission
java.security.BasicPermission
org.osgi.service.wireadmin.WirePermission
- ????????:
Serializable
,Guard
Permission for the scope of a
Wire
object. When a Envelope
object is used for communication with the poll
or update
method, and the scope is set, then the Wire
object must verify that
the Consumer service has WirePermission[name,CONSUME]
and the
Producer service has WirePermission[name,PRODUCE]
for all names in
the scope.
The names are compared with the normal rules for permission names. This means
that they may end with a "*" to indicate wildcards. E.g. Door.* indicates all
scope names starting with the string "Door". The last period is required due
to the implementations of the BasicPermission
class.
- ????:
-
????
?? -
?????
????????WirePermission
(String name, String actions) Create a new WirePermission with the given name (may be wildcard) and actions. -
????
??????????boolean
Determines the equality of twoWirePermission
objects.Returns the canonical string representation of the actions.int
hashCode()
Returns the hash code value for this object.boolean
Checks if thisWirePermission
objectimplies
the specified permission.Returns a newPermissionCollection
object for storingWirePermission
objects.toString()
Returns a string describing thisWirePermission
.??????? java.security.Permission
checkGuard, getName
-
??????
-
???????
-
WirePermission
Create a new WirePermission with the given name (may be wildcard) and actions.- ??:
name
- Wire name.actions
-produce
,consume
(canonical order).
-
-
??????
-
implies
Checks if thisWirePermission
objectimplies
the specified permission.More specifically, this method returns
true
if:- p is an instanceof the
WirePermission
class, - p's actions are a proper subset of this object's actions, and
- p's name is implied by this object's name. For example,
java.*
impliesjava.home
.
- ??:
implies
???BasicPermission
- ??:
p
- The permission to check against.- ??:
true
if the specified permission is implied by this object;false
otherwise.
- p is an instanceof the
-
getActions
Returns the canonical string representation of the actions. Always returns present actions in the following order:produce
,consume
.- ??:
getActions
???BasicPermission
- ??:
- The canonical string representation of the actions.
-
newPermissionCollection
Returns a newPermissionCollection
object for storingWirePermission
objects.- ??:
newPermissionCollection
???BasicPermission
- ??:
- A new
PermissionCollection
object suitable for storingWirePermission
objects.
-
equals
Determines the equality of twoWirePermission
objects. Checks that specified object has the same name and actions as thisWirePermission
object.- ??:
equals
???BasicPermission
- ??:
obj
- The object to test for equality.- ??:
- true if
obj
is aWirePermission
, and has the same name and actions as thisWirePermission
object;false
otherwise.
-
hashCode
public int hashCode()Returns the hash code value for this object.- ??:
hashCode
???BasicPermission
- ??:
- Hash code value for this object.
-
toString
Returns a string describing thisWirePermission
. The convention is to specify the class name, the permission name, and the actions in the following format: '(org.osgi.service.wireadmin.WirePermission "name" "actions")'.- ??:
toString
???Permission
- ??:
- information about this
Permission
object.
-