|
OSGi™ Service Platform Release 4 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.security.Permission
org.osgi.service.event.TopicPermission
A bundle's authority to publish or subscribe to event on a topic.
A topic is a slash-separated string that defines a topic.
For example:
org/osgi/service/foo/FooEvent/ACTION
TopicPermission has two actions: publish and
subscribe.
| Field Summary | |
static java.lang.String |
PUBLISH
The action string publish. |
static java.lang.String |
SUBSCRIBE
The action string subscribe. |
| Constructor Summary | |
TopicPermission(java.lang.String name,
java.lang.String actions)
Defines the authority to publich and/or subscribe to a topic within the EventAdmin service. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
Determines the equality of two TopicPermission objects. |
java.lang.String |
getActions()
Returns the canonical string representation of the TopicPermission actions. |
int |
hashCode()
Returns the hash code value for this object. |
boolean |
implies(java.security.Permission p)
Determines if the specified permission is implied by this object. |
java.security.PermissionCollection |
newPermissionCollection()
Returns a new PermissionCollection object suitable for
storing TopicPermission objects. |
| Methods inherited from class java.security.Permission |
checkGuard, getName, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String PUBLISH
publish.
public static final java.lang.String SUBSCRIBE
subscribe.
| Constructor Detail |
public TopicPermission(java.lang.String name,
java.lang.String actions)
The name is specified as a slash-separated string. Wildcards may be used. For example:
org/osgi/service/fooFooEvent/ACTION
com/isv/*
*
A bundle that needs to publish events on a topic must have the
appropriate TopicPermission for that topic; similarly, a
bundle that needs to subscribe to events on a topic must have the
appropriate TopicPermssion for that topic.
name - Topic name.actions - publish,subscribe
(canonical order).| Method Detail |
public boolean implies(java.security.Permission p)
This method checks that the topic name of the target is implied by the
topic name of this object. The list of TopicPermission
actions must either match or allow for the list of the target object to
imply the target TopicPermission action.
x/y/*,"publish" -> x/y/z,"publish" is true
*,"subscribe" -> x/y,"subscribe" is true
*,"publish" -> x/y,"subscribe" is false
x/y,"publish" -> x/y/z,"publish" is false
p - The target permission to interrogate.
true if the specified TopicPermission
action is implied by this object; false otherwise.public java.lang.String getActions()
TopicPermission actions.
Always returns present TopicPermission actions in the
following order: publish,subscribe.
TopicPermission actions.public java.security.PermissionCollection newPermissionCollection()
PermissionCollection object suitable for
storing TopicPermission objects.
PermissionCollection object.public boolean equals(java.lang.Object obj)
TopicPermission objects.
This method checks that specified TopicPermission has the same topic name and
actions as this
TopicPermission object.
obj - The object to test for equality with this
TopicPermission object.
true if obj is a
TopicPermission, and has the same topic name and
actions as this TopicPermission object;
false otherwise.public int hashCode()
|
OSGi™ Service Platform Release 4 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||