|
OSGi™ Service Platform Release 4 Version 4.2 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.security.Permission org.osgi.service.remoteserviceadmin.EndpointPermission
public final class EndpointPermission
A bundle's authority to export, import or read an Endpoint.
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.
Field Summary | |
---|---|
static java.lang.String |
EXPORT
The action string export . |
static java.lang.String |
IMPORT
The action string import . |
static java.lang.String |
READ
The action string read . |
Constructor Summary | |
---|---|
EndpointPermission(EndpointDescription endpoint,
java.lang.String localFrameworkUUID,
java.lang.String actions)
Creates a new requested EndpointPermission object to be used
by code that must perform checkPermission . |
|
EndpointPermission(java.lang.String filterString,
java.lang.String actions)
Create a new EndpointPermission with the specified filter. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Determines the equality of two EndpointPermission 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 EndpointPermission object "implies" the
specified permission. |
java.security.PermissionCollection |
newPermissionCollection()
Returns a new PermissionCollection object for storing
EndpointPermission |
Methods inherited from class java.security.Permission |
---|
checkGuard, getName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String READ
read
.
public static final java.lang.String IMPORT
import
. The import
action
implies the read
action.
public static final java.lang.String EXPORT
export
. The export
action
implies the read
action.
Constructor Detail |
---|
public EndpointPermission(java.lang.String filterString, java.lang.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
.
java.lang.IllegalArgumentException
- If the filter has an invalid syntax or
the actions are not valid.public EndpointPermission(EndpointDescription endpoint, java.lang.String localFrameworkUUID, java.lang.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
.
java.lang.IllegalArgumentException
- If the endpoint is null
or
the actions are not valid.Method Detail |
---|
public boolean implies(java.security.Permission p)
EndpointPermission
object "implies" the
specified permission.
implies
in class java.security.Permission
p
- The target permission to check.
true
if the specified permission is implied by this
object; false
otherwise.public java.lang.String getActions()
read
, import
, export
.
getActions
in class java.security.Permission
public java.security.PermissionCollection newPermissionCollection()
PermissionCollection
object for storing
EndpointPermission objects.
- Overrides:
newPermissionCollection
in class java.security.Permission
- Returns:
- A new
PermissionCollection
object suitable for
storing EndpointPermission
objects.
public boolean equals(java.lang.Object obj)
EndpointPermission
.
equals
in class java.security.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 java.security.Permission
|
OSGi™ Service Platform Release 4 Version 4.2 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |