The exception is reporting a NullPointerException
in your getEvent
method because the entriesForTs
is null.
The @UIEventTopic
handling code seems to call the event handler once with a null value the first time it is used (and then calls it again with the correct value). So just check for null in your getEvent
.
Update:
You could try using org.osgi.service.event.Event
as the type of the getEvent
argument in case there is some problem with resolving the argument type:
public void getEvent(@UIEventTopic("value") Event event)
{
data = event.getProperty(IEventBroker.DATA);
You could also try IEventBroker.subscribe
if the @UIEventTopic
refuses to work.
Update 2:
The event broker send
(and post
) methods treat Map
specially and assumes it is a map containing the values you want to send. So it will be looking in the Map for an IEventBroker.DATA
key. It would be best to wrap your map in a container class.