public final class EndpointPermission extends Permission
export
action allows a bundle to export a service as an
Endpoint.import
action allows a bundle to import a service from an
Endpoint.read
action allows a bundle to read references to an
Endpoint.EndpointPermission
to read the specific service.Modifier and Type | Field and Description |
---|---|
static String |
EXPORT
The action string
export . |
static String |
IMPORT
The action string
import . |
static String |
READ
The action string
read . |
Constructor and Description |
---|
EndpointPermission(EndpointDescription endpoint,
String localFrameworkUUID,
String actions)
Creates a new requested
EndpointPermission object to be used by
code that must perform checkPermission . |
EndpointPermission(String filterString,
String actions)
Create a new EndpointPermission with the specified filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Determines the equality of two EndpointPermission 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
EndpointPermission object "implies" the specified
permission. |
PermissionCollection |
newPermissionCollection()
Returns a new
PermissionCollection object for storing
EndpointPermission objects. |
checkGuard, getName, toString
public static final String READ
read
.public static final String IMPORT
import
. The import
action implies the
read
action.public static final String EXPORT
export
. The export
action implies the
read
action.public EndpointPermission(String filterString, String actions)
The filter will be evaluated against the endpoint properties of a requested EndpointPermission.
There are three possible actions: read
, import
and
export
. The read
action allows the owner of this
permission to see the presence of distributed services. The
import
action allows the owner of this permission to import an
endpoint. The export
action allows the owner of this permission
to export a service.
filterString
- The filter string or "*" to match all
endpoints.actions
- The actions read
, import
, or
export
.IllegalArgumentException
- If the filter has an invalid syntax or
the actions are not valid.public EndpointPermission(EndpointDescription endpoint, String localFrameworkUUID, String actions)
EndpointPermission
object to be used by
code that must perform checkPermission
.
EndpointPermission
objects created with this constructor cannot
be added to an EndpointPermission
permission collection.endpoint
- The requested endpoint.localFrameworkUUID
- The UUID of the local framework. This is used
to support matching the
endpoint.framework.uuid
endpoint property to the
<<LOCAL>>
value in the filter expression.actions
- The actions read
, import
, or
export
.IllegalArgumentException
- If the endpoint is null
or the
actions are not valid.public boolean implies(Permission p)
EndpointPermission
object "implies" the specified
permission.implies
in class Permission
p
- The target permission to check.true
if the specified permission is implied by this
object; false
otherwise.public String getActions()
read
,
import
, export
.getActions
in class Permission
public PermissionCollection newPermissionCollection()
PermissionCollection
object for storing
EndpointPermission
objects.newPermissionCollection
in class Permission
PermissionCollection
object suitable for storing
EndpointPermission
objects.public boolean equals(Object obj)
EndpointPermission
.equals
in class Permission
obj
- The object to test for equality.EndpointPermission
, and has the same
name, actions and endpoint as this EndpointPermission
object; false
otherwise.public int hashCode()
hashCode
in class Permission
Copyright © OSGi Alliance (2000, 2015). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0