Skip to content

Instantly share code, notes, and snippets.

@mathieuancelin
Created May 28, 2013 15:41
Show Gist options
  • Select an option

  • Save mathieuancelin/5663702 to your computer and use it in GitHub Desktop.

Select an option

Save mathieuancelin/5663702 to your computer and use it in GitHub Desktop.
import static reactor.Fn.$;
@Inject
Service service;
Reactor reactor = R.create();
reactor.on($("parse"), new Consumer<Event<String>>() {
public void call(Event<String> ev) {
service.handleEvent(ev);
}
});
reactor.notify("parse", Fn.event("Hello World!"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment