public final class WirePermission extends BasicPermission
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.
| Modifier and Type | Field and Description |
|---|---|
static String |
CONSUME
The action string for the
consume action. |
static String |
PRODUCE
The action string for the
produce action. |
| Constructor and Description |
|---|
WirePermission(String name,
String actions)
Create a new WirePermission with the given name (may be wildcard) and
actions.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Determines the equality of two
WirePermission objects. |
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
WirePermission object implies the
specified permission. |
PermissionCollection |
newPermissionCollection()
Returns a new
PermissionCollection object for storing
WirePermission objects. |
String |
toString()
Returns a string describing this
WirePermission. |
checkGuard, getNamepublic static final String PRODUCE
produce action.public static final String CONSUME
consume action.public boolean implies(Permission p)
WirePermission object implies the
specified permission.
More specifically, this method returns true if:
WirePermission class,java.* implies java.home.implies in class BasicPermissionp - The permission to check against.true if the specified permission is implied by this
object; false otherwise.public String getActions()
produce,
consume.getActions in class BasicPermissionpublic PermissionCollection newPermissionCollection()
PermissionCollection object for storing
WirePermission objects.newPermissionCollection in class BasicPermissionPermissionCollection object suitable for storing
WirePermission objects.public boolean equals(Object obj)
WirePermission objects.
Checks that specified object has the same name and actions as this
WirePermission object.equals in class BasicPermissionobj - The object to test for equality.obj is a WirePermission, and has the same
name and actions as this WirePermission object;
false otherwise.public int hashCode()
hashCode in class BasicPermissionpublic String toString()
WirePermission. 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 in class PermissionPermission object.Copyright © OSGi Alliance (2000, 2015). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0