org.osgi.framework
public final class ServicePermission extends BasicPermission
ServicePermission.REGISTER
action allows a bundle to
register a service on the specified names.
ServicePermission.GET
action allows a bundle to
detect a service and get it.
ServicePermission
to get the specific service.
Version: $Revision: 1.15 $
Field Summary | |
---|---|
static String | GET
The action string get (Value is "get"). |
static String | REGISTER
The action string register (Value is "register"). |
Constructor Summary | |
---|---|
ServicePermission(String name, String actions)
Create a new ServicePermission.
|
Method Summary | |
---|---|
boolean | equals(Object obj)
Determines the equalty of two ServicePermission 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)
Determines if a ServicePermission object "implies" the
specified permission.
|
PermissionCollection | newPermissionCollection()
Returns a new PermissionCollection object for storing
ServicePermission |
get
(Value is "get").register
(Value is "register").The name of the service is specified as a fully qualified class name.
ClassName ::= <class name> | <class name ending in ".*">Examples:
org.osgi.service.http.HttpService org.osgi.service.http.* org.osgi.service.snmp.*
There are two possible actions: get
and
register
. The get
permission allows the
owner of this permission to obtain a service with this name. The
register
permission allows the bundle to register a
service under that name.
Parameters: name class name actions get
,register
(canonical
order)
ServicePermission
.
Parameters: obj The object to test for equality.
Returns: true if obj is a ServicePermission
, and has the
same class name and actions as this
ServicePermission
object; false
otherwise.
get
,
register
.
Returns: The canonical string representation of the actions.
Returns: Hash code value for this object.
ServicePermission
object "implies" the
specified permission.
Parameters: p The target permission to check.
Returns: true
if the specified permission is implied by
this object; false
otherwise.
PermissionCollection
object for storing
ServicePermission objects.
Returns: A new PermissionCollection
object suitable for storing
ServicePermission
objects.