|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.eventadmin.impl.handler.BlacklistingHandlerTasks
public class BlacklistingHandlerTasks
This class is an implementation of the HandlerTasks interface that does provide blacklisting of event handlers. Furthermore, handlers are determined from the framework on any call to createHandlerTasks() hence, there is no book-keeping of EventHandler services while they come and go but a query for each sent event. In order to do this, an ldap-filter is created that will match applicable EventHandler references. In order to ease some of the overhead pains of this approach some light caching is going on.
Constructor Summary | |
---|---|
BlacklistingHandlerTasks(BundleContext context,
BlackList blackList,
TopicHandlerFilters topicHandlerFilters,
Filters filters,
TopicPermissions topicPermissions)
The constructor of the factory. |
Method Summary | |
---|---|
void |
blackList(ServiceReference handlerRef)
Blacklist the given service reference. |
HandlerTask[] |
createHandlerTasks(Event event)
Create the handler tasks for the event. |
EventHandler |
getEventHandler(ServiceReference handlerRef)
Get the real EventHandler service for the handlerRef from the context in case the ref is not blacklisted and the service is not unregistered. |
void |
ungetEventHandler(EventHandler handler,
ServiceReference handlerRef)
Unget the service reference for the given event handler unless it is the NullEventHandler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlacklistingHandlerTasks(BundleContext context, BlackList blackList, TopicHandlerFilters topicHandlerFilters, Filters filters, TopicPermissions topicPermissions)
context
- The context of the bundleblackList
- The set to use for keeping track of blacklisted referencestopicHandlerFilters
- The factory for topic handler filtersfilters
- The factory for Filter objectstopicPermissions
- The factory for permission objects of type PUBLISHMethod Detail |
---|
public HandlerTask[] createHandlerTasks(Event event)
createHandlerTasks
in interface HandlerTasks
event
- The event for which' handlers delivery tasks must be created
HandlerTasks.createHandlerTasks(org.osgi.service.event.Event)
public void blackList(ServiceReference handlerRef)
handlerRef
- The service reference to blacklistpublic EventHandler getEventHandler(ServiceReference handlerRef)
handlerRef
- The service reference for which to get its service
public void ungetEventHandler(EventHandler handler, ServiceReference handlerRef)
handler
- The event handler service to ungethandlerRef
- The service reference to unget
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |