I'm trying to use EventBus from Jython. Sending events to the from Jython bus works as expected, they can be listened from my Java code. But subscribing to the bus from Jython is problematic. I'm trying this:
class Listener(EventTopicSubscriber):
def onEvent(self, topic, object):
print("got an event")
EventBus.subscribe("Topic", Listener)
It gives the following :
TypeError: subscribe(): 1st arg can't be coerced to java.util.regex.Pattern,
java.lang.reflect.Type, String, java.lang.Class
I'm surprised that there can be something wrong with the 1st argument. My understanding is that it's a String literal, just as it's supposed to be. Any ideas?