|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.eventadmin.impl.security.CacheTopicPermissions
public class CacheTopicPermissions
An implementation of the TopicPermissions factory that uses a given cache in order to speed-up topic permission creation. Note that a java.lang.Object is returned in case creating a new TopicPermission fails. This assumes that Bundle.hasPermission is used in order to evaluate the created Permission which in turn will return true if security is not supported by the framework. Otherwise, it will return false due to receiving something that is not a subclass of java.lang.SecurityPermission hence, this combination ensures that access is granted in case a topic permission could not be created due to missing security support by the framework.
TopicPermissions
Constructor Summary | |
---|---|
CacheTopicPermissions(CacheMap cache,
java.lang.String type)
The constructor of this permission factory. |
Method Summary | |
---|---|
java.lang.Object |
createTopicPermission(java.lang.String topic)
Creates a TopicPermission for the given topic and the type of this factory (i.e., PUBLISH or SUBSCRIBE). |
java.lang.String |
getType()
Returns the type of the permissions created by this factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheTopicPermissions(CacheMap cache, java.lang.String type)
cache
- The cache to be usedtype
- The type that created permissions will be of (i.e, PUBLISH or
SUBSCRIBE)TopicPermissions
,
TopicPermission.PUBLISH
,
TopicPermission.SUBSCRIBE
Method Detail |
---|
public java.lang.String getType()
getType
in interface TopicPermissions
TopicPermissions.getType()
,
TopicPermission.PUBLISH
,
TopicPermission.SUBSCRIBE
public java.lang.Object createTopicPermission(java.lang.String topic)
createTopicPermission
in interface TopicPermissions
topic
- The target topic
TopicPermissions.createTopicPermission(String)
,
TopicPermission
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |