Class EndpointPermission
- java.lang.Object
- 
- java.security.Permission
- 
- org.osgi.service.remoteserviceadmin.EndpointPermission
 
 
- 
- All Implemented Interfaces:
- Serializable,- Guard
 
 public final class EndpointPermission extends Permission A bundle's authority to export, import or read an Endpoint.- The exportaction allows a bundle to export a service as an Endpoint.
- The importaction allows a bundle to import a service from an Endpoint.
- The readaction allows a bundle to read references to an Endpoint.
 EndpointPermissionto read the specific service.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description EndpointPermission(String filterString, String actions)Create a new EndpointPermission with the specified filter.EndpointPermission(EndpointDescription endpoint, String localFrameworkUUID, String actions)Creates a new requestedEndpointPermissionobject to be used by code that must performcheckPermission.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Determines the equality of two EndpointPermission objects.StringgetActions()Returns the canonical string representation of the actions.inthashCode()Returns the hash code value for this object.booleanimplies(Permission p)Determines if aEndpointPermissionobject "implies" the specified permission.PermissionCollectionnewPermissionCollection()Returns a newPermissionCollectionobject for storingEndpointPermissionobjects.- 
Methods inherited from class java.security.PermissioncheckGuard, getName, toString
 
- 
 
- 
- 
- 
Field Detail- 
READpublic static final String READ The action stringread.- See Also:
- Constant Field Values
 
 - 
IMPORTpublic static final String IMPORT The action stringimport. Theimportaction implies thereadaction.- See Also:
- Constant Field Values
 
 - 
EXPORTpublic static final String EXPORT The action stringexport. Theexportaction implies thereadaction.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
EndpointPermissionpublic EndpointPermission(String filterString, String actions) Create a new EndpointPermission with the specified filter.The filter will be evaluated against the endpoint properties of a requested EndpointPermission. There are three possible actions: read,importandexport. Thereadaction allows the owner of this permission to see the presence of distributed services. Theimportaction allows the owner of this permission to import an endpoint. Theexportaction allows the owner of this permission to export a service.- Parameters:
- filterString- The filter string or "*" to match all endpoints.
- actions- The actions- read,- import, or- export.
- Throws:
- IllegalArgumentException- If the filter has an invalid syntax or the actions are not valid.
 
 - 
EndpointPermissionpublic EndpointPermission(EndpointDescription endpoint, String localFrameworkUUID, String actions) Creates a new requestedEndpointPermissionobject to be used by code that must performcheckPermission.EndpointPermissionobjects created with this constructor cannot be added to anEndpointPermissionpermission collection.- Parameters:
- endpoint- The requested endpoint.
- localFrameworkUUID- The UUID of the local framework. This is used to support matching the- endpoint.framework.uuidendpoint property to the- <<LOCAL>>value in the filter expression.
- actions- The actions- read,- import, or- export.
- Throws:
- IllegalArgumentException- If the endpoint is- nullor the actions are not valid.
 
 
- 
 - 
Method Detail- 
impliespublic boolean implies(Permission p) Determines if aEndpointPermissionobject "implies" the specified permission.- Specified by:
- impliesin class- Permission
- Parameters:
- p- The target permission to check.
- Returns:
- trueif the specified permission is implied by this object;- falseotherwise.
 
 - 
getActionspublic String getActions() Returns the canonical string representation of the actions. Always returns present actions in the following canonical order:read,import,export.- Specified by:
- getActionsin class- Permission
- Returns:
- The canonical string representation of the actions.
 
 - 
newPermissionCollectionpublic PermissionCollection newPermissionCollection() Returns a newPermissionCollectionobject for storingEndpointPermissionobjects.- Overrides:
- newPermissionCollectionin class- Permission
- Returns:
- A new PermissionCollectionobject suitable for storingEndpointPermissionobjects.
 
 - 
equalspublic boolean equals(Object obj) Determines the equality of two EndpointPermission objects. Checks that specified object has the same name, actions and endpoint as thisEndpointPermission.- Specified by:
- equalsin class- Permission
- Parameters:
- obj- The object to test for equality.
- Returns:
- true If obj is a EndpointPermission, and has the same name, actions and endpoint as thisEndpointPermissionobject;falseotherwise.
 
 - 
hashCodepublic int hashCode() Returns the hash code value for this object.- Specified by:
- hashCodein class- Permission
- Returns:
- Hash code value for this object.
 
 
- 
 
-