public final class ServicePermission
extends java.security.BasicPermission
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
GET
The action string get (Value is "get").
|
static java.lang.String |
REGISTER
The action string register (Value is "register").
|
| Constructor and Description |
|---|
ServicePermission(java.lang.String name,
java.lang.String actions)
Create a new ServicePermission.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Determines the equalty of two ServicePermission objects.
|
java.lang.String |
getActions()
Returns the canonical string representation of the actions.
|
int |
hashCode()
Returns the hash code value for this object.
|
boolean |
implies(java.security.Permission p)
Determines if a ServicePermission object "implies" the
specified permission.
|
java.security.PermissionCollection |
newPermissionCollection()
Returns a new PermissionCollection object for storing
ServicePermission objects.
|
public static final java.lang.String GET
public static final java.lang.String REGISTER
public ServicePermission(java.lang.String name,
java.lang.String actions)
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.
name - class nameactions - get, register (canonical order)public boolean implies(java.security.Permission p)
implies in class java.security.BasicPermissionp - The target permission to check.public java.lang.String getActions()
getActions in class java.security.BasicPermissionpublic java.security.PermissionCollection newPermissionCollection()
newPermissionCollection in class java.security.BasicPermissionpublic boolean equals(java.lang.Object obj)
equals in class java.security.BasicPermissionobj - The object to test for equality.public int hashCode()
hashCode in class java.security.BasicPermission