JRuby implemented a comprehensive set of helpers to deal with the event source, explained in detail here: