Listener for Events.
{@code EventHandler} objects are registered with the Framework serviceregistry and are notified with an {@code Event} object when an event is sentor posted.
{@code EventHandler} objects can inspect the received {@code Event} object todetermine its topic and properties.
{@code EventHandler} objects must be registered with a service property{@link EventConstants#EVENT_TOPIC} whose value is the list of topics in whichthe event handler is interested.
For example:
String[] topics = new String[] {"com/isv/*"}; Hashtable ht = new Hashtable(); ht.put(EventConstants.EVENT_TOPIC, topics); context.registerService(EventHandler.class.getName(), this, ht);
Event Handler services can also be registered with an {@link EventConstants#EVENT_FILTER} service property to further filter theevents. If the syntax of this filter is invalid, then the Event Handler must be ignored by the Event Admin service. The Event Admin service should log a warning.
Security Considerations. Bundles wishing to monitor {@code Event} objectswill require {@code ServicePermission[EventHandler,REGISTER]} to register an{@code EventHandler} service. The bundle must also have{@code TopicPermission[topic,SUBSCRIBE]} for the topic specified in the eventin order to receive the event.
@see Event
@ThreadSafe
@author $Id: 44528634004c1b036551712f94703a8b5a55cba4 $