Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Distributed EventAdmin Service

Hi Philipp and Roshan,

In accord with the bug that Philipp created (i.e. ) I've implemented the proper OSGi-specified behavior for the use of EVENT_TOPIC and EVENT_FILTER service properties (for EventHandler implementation).

This is all part of ECF HEAD currently, and so will only be a part of ECF 3.1 (not 3.0.1/Galileo maintenance release).


Konradi, Philipp wrote:

The EVENT_FILTER supplied with an EventHandler is only evaluated on
event properties.
Roshan, this means in your example that the event you sent should have a
property "topic" with value "defaultTopic" to be delivered to the event
handler you described. I'd first verify this.
In addition to Scott's example:
EventConstants.EVENT_TOPIC can also be supplied directly to
event-handlers service registration properties. Like this:

Dictionary d = new Hashtable();
d.put(EventConstants.EVENT_TOPIC, topics );
"(my_event_property=foo.*)" );
context.registerService( EventHandler.class.getName(), this, d );

Thanks, Philipp
BTW: I filed right now a bug / feature request on adding
EventConstants.EVENT_TOPIC evaluation to in DistributedEventAdmin
implementation (to make it spec compliant). That might be the cause for the problem you describing as well.

-----Original Message-----
From: ecf-dev-bounces@xxxxxxxxxxx [mailto:ecf-dev-bounces@xxxxxxxxxxx]
On Behalf Of Scott Lewis
Sent: Tuesday, September 15, 2009 7:39 PM
To: Eclipse Communication Framework (ECF) developer mailing list.
Subject: Re: [ecf-dev] Distributed EventAdmin Service

Hi Roshan,

I've done some testing, and determined that the current EventAdmin
filtering works fine/ok.  What was wrong with your EventHandler
property is that the EVENT_FILTER creation should look like this:


with this way of defining the event filter the EventAdmin matching
just fine.

I've added this code to the example
(, and will include something
like it in the test case.



roshan joseph wrote:
 Could someone let me know whether the distributed eventadmin
support filters?

I was trying to add a filter condition to the eventhandler code in
properties object, but the event handler is found no response to the

In the testeventhandler code I have added another line like

before registering the eventhandler. Events with different topic
are also processed by the handler.

Really appreciate all help in advance.

Thanks & Regards,

ecf-dev mailing list

ecf-dev mailing list
ecf-dev mailing list

Back to the top