Observable<SomeType> observable = someObservable(); ListenableFuture<SomeType> future = someFuture(); Rx.subscribe(observable, val -> doSomething(val)); Rx.subscribe(future, val -> doSomething(val));
It also provides reactive getters, a simple abstraction for piping data which allows access via
T get() or
RxBox<Point> mousePos = RxBox.of(new Point(0, 0)); this.addMouseListener(e -> mousePos.set(new Point(e.x, e.y))); Rectangle hotSpot = new Rectangle(0, 0, 10, 10) RxGetter<Boolean> isMouseOver = mousePos.map(hotSpot::contains);
Debugging an error which involves lots of callbacks can be difficult. To make this easier, DurianRx includes a tracing capability, which makes this task easier.
// anytime an error is thrown in an Rx callback, the stack trace of the error // will be wrapped by the stack trace of the original subscription DurianPlugins.register(RxTracingPolicy.class, new LogSubscriptionTrace()).
- Many thanks to RxJava and Guava.
- Formatted by spotless, as such.
- Bugs found by findbugs, as such.
- OSGi metadata generated by JRuyi's [osgibnd-gradle-plugin] (https://github.com/jruyi/osgibnd-gradle-plugin), which leverages Peter Kriens' bnd.
- Scripts in the
.cifolder are inspired by Ben Limmer's work.
- Built by gradle.
- Tested by junit.
- Maintained by DiffPlug.