Skip to content

Releases: ReactiveX/RxJavaFX

RxJavaFX 2.1.0

28 May 01:37

Choose a tag to compare

  • Deprecated CompositeObservable, use a Subject instead to decouple Observables and Observers #54
  • Group ID has been changed to io.reactivex.rxjava2 so build systems can use RxJavaFX 1.x and 2.x in the same project #53
  • Updated RxJava dependency to 2.1.0

Release 2.0.2 - Rollout corrections

25 Feb 23:05

Choose a tag to compare

Refactored to use io.reactivex.rxjavafx domain instead of rx.

RxJavaFX 2.0 Release

25 Feb 20:27

Choose a tag to compare

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 use JavaFxObservable.nullableValuesOf() to emit nullable values as Java 8 Optionals.
  • JavaFX Bindings now need to receive emissions from both Observables or Flowables. The JavaFxSubscriber utility class has been separated into JavaFxObserver and JavaFxSubscriber, which create Bindings off Observables and Flowables respectively.
  • JavaFxTransformers also has been split into FxObservableTransformers and FxFlowableTransformers, 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

25 Feb 20:02

Choose a tag to compare

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 use JavaFxObservable.nullableValuesOf() to emit nullable values as Java 8 Optionals.
  • JavaFX Bindings now need to receive emissions from both Observables or Flowables. The JavaFxSubscriber utility class has been separated into JavaFxObserver and JavaFxSubscriber, which create Bindings off Observables and Flowables respectively.
  • JavaFxTransformers also has been split into FxObservableTransformers and FxFlowableTransformers, 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

24 Feb 01:01

Choose a tag to compare

RxJavaFX 2.0-RC1 Pre-release
Pre-release

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 values
  • JavaFxObservable.nullableValuesOf() added to emit null values wrapped in a Java 8 Optional<T>
  • JavaFXObservable.nonNullValuesOf() has been removed
  • JavaFxSubscriber.toBinding() is overloaded to support both Observables and Flowables
  • JavaFxTransformers has been separated into FxFlowableTransformers and FxObservableTransformers
  • JavaFxSubscriber.toLazyBinding() has been removed due to implementation challenges.
  • JavaFxScheduler.getInstance() factory has been removed in favor of JavaFxScheduler.platform()

Release 1.1.0

25 Feb 04:57

Choose a tag to compare

Many thanks to @protogenes for being the driver of this release.

NEW FEATURES

  • Implemented @protogenes' new JavaFxScheduler implementation that features less overhead and improved performance.
  • Added JavaFxObservable.invalidationsOf() factory

Release 1.0.0

18 Dec 04:42

Choose a tag to compare

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 JavaFxObservable have been deprecated and replaced with more concise factory names inspired by ReactFX. For instance, fromObservableValue() is now valuesOf(). The RxJavaFX Guide will be updated later to reflect these new naming conventions.
  • In JavaFxObservable, there are now nonNullValuesOf() and nonNullChangesOf() factories that effectively supress null values emitted from an ObservableValue.
  • The CompositeObservable @beta tag has been removed.
  • A new set of Transformers have been provided via the JavaFxTransformers static class. These are new Rx operators specific to JavaFX
    • doOnNextFx() - same as doOnNext() but executes on FX thread
    • doOnCompletedFx() - same as doOnCompleted() but executes on FX thread
    • doOnErrorFx() - same as doOnError() but executes on FX thread
    • doOnSubscribeFx() - same as doOnSubscribe() but executes on FX thread
    • doOnUnsubscribeFx() - same as doOnUnsubscribe() but executes on FX thread
    • doOnTerminateFx() - same as doOnTerminate() but executes on FX thread
    • doOnNextCount() - performs the provided action with the emission count for each onNext() call
    • doOnCompletedCount() - performs the provided action with the emission count for an onCompleted() call
    • doOnErrorCount() - performs the provided action with the emission count for an onError() call
    • doOnNextCountFx() - same as doOnNextCount() but executes on FX thread
    • doOnCompletedCountFx() - same as doOnCompletedCount() but executes on FX thread
    • doOnErrorCountFx() - same as doOnErrorCount() 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

07 Nov 00:12

Choose a tag to compare

  • Backed CompositeObservable with a serialized PublishSubject, allowing sources to be removed from a CompositeObservable at any time.
  • CompositeObservable#add() now returns a Subscription that can be used to unsubscribe() the CompositeObservable from a source Observable.
  • addAll() will return a CompositeSubscription containing all the Subscriptions.
  • remove(), removeAll(), clear(), and getSources() were removed from CompositeObservable as they are no longer are relevant due to above changes.

Release 0.2.0 - CompositeObservable w/ Transformer

11 Sep 18:33

Choose a tag to compare

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

26 Jul 04:15

Choose a tag to compare

  • Fixed JavaFxObservable#fromObservableSet() not emitting anything
  • Implemented addAll(), removeAll(), clear(), and getBackingSet() methods on CompositeObservable