|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.felix.eventadmin.impl.Configuration
public class Configuration
The Configuration
class encapsules the
configuration for the event admin.
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=*).
org.apache.felix.eventadmin.IgnoreTimeout - Configure EventHandlers to be called without a timeout.
If a timeout is configured by default all event handlers are called using the timeout. For performance optimization it is possible to configure event handlers where the timeout handling is not used - this reduces the thread usage from the thread pools as the timout handling requires an additional thread to call the event handler. However, the application should work without this configuration property. It is a pure optimization! The value is a list of string (separated by comma). If the string ends with a dot, all handlers in exactly this package are ignored. If the string ends with a star, all handlers in this package and all subpackages are ignored. If the string neither ends with a dot nor with a start, this is assumed to define an exact class name. These properties are read at startup and serve as a default configuration. If a configuration admin is configured, the event admin can be configured through the config admin.
Constructor Summary | |
---|---|
Configuration(org.osgi.framework.BundleContext bundleContext)
|
Method Summary | |
---|---|
void |
destroy()
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 Configuration(org.osgi.framework.BundleContext bundleContext)
Method Detail |
---|
public void destroy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |