|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.eventadmin.impl.Activator
public class Activator
The activator of the EventAdmin bundle. This class registers an implementation of the OSGi R4 EventAdmin service (see the Compendium 113) with the framework. It features timeout-based blacklisting of event-handlers for both, asynchronous and synchronous event-dispatching (as a spec conform optional extension). The service knows about the following properties which are read at bundle startup:
org.apache.felix.eventadmin.CacheSize - The size of various internal caches.
The default value is 30. Increase in case of a large number (more then 100) of EventHandler services. A value less then 10 triggers the default value.
org.apache.felix.eventadmin.ThreadPoolSize - The size of the thread pool.
The default value is 10. Increase in case of a large amount of synchronous events where the EventHandler services in turn send new synchronous events in the event dispatching thread or a lot of timeouts are to be expected. A value of less then 2 triggers the default value. A value of 2 effectively disables thread pooling.
org.apache.felix.eventadmin.Timeout - The black-listing timeout in milliseconds
The default value is 5000. Increase or decrease at own discretion. A value of less then 100 turns timeouts off. Any other value is the time in milliseconds granted to each EventHandler before it gets blacklisted.
org.apache.felix.eventadmin.RequireTopic - Are EventHandler required to be registered with a topic?
The default is true. The specification says that EventHandler must register with a list of topics they are interested in. Setting this value to false will enable that handlers without a topic are receiving all events (i.e., they are treated the same as with a topic=*).
Constructor Summary | |
---|---|
Activator()
|
Method Summary | |
---|---|
protected EventAdminImpl |
createEventAdmin(org.osgi.framework.BundleContext context,
HandlerTasks handlerTasks,
DeliverTasks asyncExecuters,
DeliverTasks syncExecuters)
Create a event admin implementation. |
void |
start(org.osgi.framework.BundleContext context)
Called upon starting of the bundle. |
void |
stop(org.osgi.framework.BundleContext context)
Called upon stopping the bundle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Activator()
Method Detail |
---|
public void start(org.osgi.framework.BundleContext context)
start
in interface org.osgi.framework.BundleActivator
context
- The bundle context passed by the frameworkBundleActivator.start(org.osgi.framework.BundleContext)
public void stop(org.osgi.framework.BundleContext context)
stop
in interface org.osgi.framework.BundleActivator
context
- The bundle context passed by the frameworkBundleActivator.stop(org.osgi.framework.BundleContext)
protected EventAdminImpl createEventAdmin(org.osgi.framework.BundleContext context, HandlerTasks handlerTasks, DeliverTasks asyncExecuters, DeliverTasks syncExecuters)
context
- The bundle contexthandlerTasks
- asyncExecuters
- syncExecuters
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |