RxJava and Lambda support

I am creating a binding and was wondering if I can use RxJava or RxJava2 reactive libraries as a dependency? Also, are Java 8 lambdas supported?

1 Like

Hi all,
I am also thinking to switch to RxJava2 to implement the low level part of a protocol binding I am working on (want to remove an old implementation).
Is there any restriction to use this package in OH2 ?
https://github.com/ReactiveX/RxJava
(maven io.reactivex.rxjava2 rxjava)

I can see Java 8 Ladas are indeed supported and already used in some bindings, for example the Chromecast biding.

Thanks,
massi

@massi yes you can, we are doing this now. Simply add the RxJava dependency to your protocol.
OH2 already supports Java8 for lamdas.

Refer to:
https://www.eclipse.org/smarthome/documentation/development/bindings/dependencies.html