Releases: ReactiveX/RxJavaFX
RxJavaFX 2.1.0
Release 2.0.2 - Rollout corrections
Refactored to use io.reactivex.rxjavafx domain instead of rx.
RxJavaFX 2.0 Release
RxJavaFX Now Supports RxJava 2.0
Re-released to trigger rebuild
RxJava 2.0 is a ground-up rewrite of RxJava that makes many critical changes to the ReactiveX implementation for Java. You can read more about what is different in RxJava 2.0 here. Documentation on RxJava 2.0 is an ongoing effort, and the Learning RxJava with JavaFX eBook will be updated accordingly. I will also be publishing Learning RxJava, the first book covering RxJava 2.0, later this year with Packt Publishing.
The primary difference between RxJava 1.0 and 2.0 is the separation of the Observable into the Observable and Flowable types. The Observable in RxJava 1.0 supports backpressure, but in hindsight RxJava leadership realized it would have been better to create a separate backpressured type. In RxJava 2.0, this became the Flowable and backpressure was removed from the Observable. The Subscriber was separated into the Observer and Subscriber types, where the Observer is used to subscribe to Observables and the Subscriber to Flowables.
This means there are a few changes for RxJavaFX 2.0, which is the starting version utilizing RxJava 2.0:
- Since UI events cannot be backpressured, most of the source factories have been left alone and still yield Observables (and not Flowables).
- RxJava 2.0 Observables forbid emitting null values, so
JavaFxObservable.valuesOf()will ignore null values. If you want null values to be emitted, you will need to useJavaFxObservable.nullableValuesOf()to emit nullable values as Java 8 Optionals. - JavaFX Bindings now need to receive emissions from both Observables or Flowables. The
JavaFxSubscriberutility class has been separated intoJavaFxObserverandJavaFxSubscriber, which create Bindings off Observables and Flowables respectively. JavaFxTransformersalso has been split intoFxObservableTransformersandFxFlowableTransformers, so JavaFX-specific operators are supported for both Observables and Flowables.- All deprecations from RxJavaFX 1.0 have been removed. The old factory naming conventions as well as
JavaFxScheduler.getInstance()are gone.
Please feel free to contact me or file an issue if you have any questions or concerns. Also, a special thanks to @protogenes for helping expedite this rollout.
RxJavaFX 2.0
RxJavaFX Now Supports RxJava 2.0
RxJava 2.0 is a ground-up rewrite of RxJava that makes many critical changes to the ReactiveX implementation for Java. You can read more about what is different in RxJava 2.0 here. Documentation on RxJava 2.0 is an ongoing effort, and the Learning RxJava with JavaFX eBook will be updated accordingly. I will also be publishing Learning RxJava, the first book covering RxJava 2.0, later this year with Packt Publishing.
The primary difference between RxJava 1.0 and 2.0 is the separation of the Observable into the Observable and Flowable types. The Observable in RxJava 1.0 supports backpressure, but in hindsight RxJava leadership realized it would have been better to create a separate backpressured type. In RxJava 2.0, this became the Flowable and backpressure was removed from the Observable. The Subscriber was separated into the Observer and Subscriber types, where the Observer is used to subscribe to Observables and the Subscriber to Flowables.
This means there are a few changes for RxJavaFX 2.0, which is the starting version utilizing RxJava 2.0:
- Since UI events cannot be backpressured, most of the source factories have been left alone and still yield Observables (and not Flowables).
- RxJava 2.0 Observables forbid emitting null values, so
JavaFxObservable.valuesOf()will ignore null values. If you want null values to be emitted, you will need to useJavaFxObservable.nullableValuesOf()to emit nullable values as Java 8 Optionals. - JavaFX Bindings now need to receive emissions from both Observables or Flowables. The
JavaFxSubscriberutility class has been separated intoJavaFxObserverandJavaFxSubscriber, which create Bindings off Observables and Flowables respectively. JavaFxTransformersalso has been split intoFxObservableTransformersandFxFlowableTransformers, so JavaFX-specific operators are supported for both Observables and Flowables.- All deprecations from RxJavaFX 1.0 have been removed. The old factory naming conventions as well as
JavaFxScheduler.getInstance()are gone.
Please feel free to contact me or file an issue if you have any questions or concerns. Also, a special thanks to @protogenes for helping expedite this rollout.
RxJavaFX 2.0-RC1
This is the pre-release of RxJavaFX 2.0, which is backed by RxJava 2.0.
For the most part, the API is largely the same as RxJavaFX 1.0. Most differences are due to the core changes in RxJava 2.0.
Please help test for functionality and share feedback on the API design. When all concerns are addressed, we will release RxJavaFX 2.0.
Key Differences:
JavaFxObservable.valuesOf()ignores null valuesJavaFxObservable.nullableValuesOf()added to emit null values wrapped in a Java 8Optional<T>JavaFXObservable.nonNullValuesOf()has been removedJavaFxSubscriber.toBinding()is overloaded to support both Observables and FlowablesJavaFxTransformershas been separated intoFxFlowableTransformersandFxObservableTransformersJavaFxSubscriber.toLazyBinding()has been removed due to implementation challenges.JavaFxScheduler.getInstance()factory has been removed in favor ofJavaFxScheduler.platform()
Release 1.1.0
Many thanks to @protogenes for being the driver of this release.
NEW FEATURES
- Implemented @protogenes' new
JavaFxSchedulerimplementation that features less overhead and improved performance. - Added
JavaFxObservable.invalidationsOf()factory
Release 1.0.0
After nearly a year of controlled experimentation and prototyping, RxJavaFX 1.0.0 has finally been released. There should be no breaking changes to upgrade to this version, however there are some sweeping deprecations as well as some new features.
- Nearly all factories in
JavaFxObservablehave been deprecated and replaced with more concise factory names inspired by ReactFX. For instance,fromObservableValue()is nowvaluesOf(). The RxJavaFX Guide will be updated later to reflect these new naming conventions. - In
JavaFxObservable, there are nownonNullValuesOf()andnonNullChangesOf()factories that effectively supress null values emitted from anObservableValue. - The
CompositeObservable@beta tag has been removed. - A new set of Transformers have been provided via the
JavaFxTransformersstatic class. These are new Rx operators specific to JavaFXdoOnNextFx()- same asdoOnNext()but executes on FX threaddoOnCompletedFx()- same asdoOnCompleted()but executes on FX threaddoOnErrorFx()- same asdoOnError()but executes on FX threaddoOnSubscribeFx()- same asdoOnSubscribe()but executes on FX threaddoOnUnsubscribeFx()- same asdoOnUnsubscribe()but executes on FX threaddoOnTerminateFx()- same asdoOnTerminate()but executes on FX threaddoOnNextCount()- performs the provided action with the emission count for eachonNext()calldoOnCompletedCount()- performs the provided action with the emission count for anonCompleted()calldoOnErrorCount()- performs the provided action with the emission count for anonError()calldoOnNextCountFx()- same asdoOnNextCount()but executes on FX threaddoOnCompletedCountFx()- same asdoOnCompletedCount()but executes on FX threaddoOnErrorCountFx()- same asdoOnErrorCount()but executes on FX thread
The doOnXXXCount() operators are helpful for updating the UI with a status on how many emissions have been processed (e.g. through a ProgressBar or a simple Label with the count).
The 1.x branch is now the primary branch. Next on the roadmap is to implement this library with RxJava 2.0 on the 2.x branch. RxJava 2.0 brings some drastic changes with it and we will need a separate RxJavaFX 2.0 implementation to support it.
RxKotlinFX will get a 1.0 release this week as well.
Release 0.3.0
- Backed
CompositeObservablewith a serializedPublishSubject, allowing sources to be removed from aCompositeObservableat any time. CompositeObservable#add()now returns aSubscriptionthat can be used tounsubscribe()theCompositeObservablefrom a sourceObservable.addAll()will return aCompositeSubscriptioncontaining all the Subscriptions.remove(),removeAll(),clear(), andgetSources()were removed fromCompositeObservableas they are no longer are relevant due to above changes.
Release 0.2.0 - CompositeObservable w/ Transformer
This release might break any previous usages of CompositeObservable, which now optionally accepts a Transformer. Any other constructors to control caching have been removed, as these were broken and now remedied by this new solution.
The CompositeObservable is modified to optionally accept a Transformer as a constructor argument. This Transformer is applied to the combined Observable so as to allow further manipulations yielded by toObservable().
You can leverage this Transformer to multicast the outputted Observable or (as shown in the example below) replay the last emission from the combined emissions.
CompositeObservable<String> source = new CompositeObservable<>(obs -> obs.replay(1).refCount());
source.toObservable().subscribe(System.out::println);
source.add(Observable.just("Alpha","Beta","Gamma"));
source.add(Observable.just("Delta","Epsilon"));
Thread.sleep(1000);
source.toObservable().subscribe(System.out::println);OUTPUT:
Alpha
Beta
Gamma
Delta
Epsilon
Epsilon
Release 0.1.4
- Fixed
JavaFxObservable#fromObservableSet()not emitting anything - Implemented
addAll(),removeAll(),clear(), andgetBackingSet()methods onCompositeObservable