All Projects → reactor → Reactor Kotlin Extensions

reactor / Reactor Kotlin Extensions

Kotlin extensions for Reactor

Programming Languages

kotlin
9241 projects

Kotlin support has been integrated directly in reactor-core, as a consequence this repository will be removed when Reactor 3.1.0.RELEASE will be released.

Kotlin extensions for Reactor

This library exposes a set of Kotlin extensions that allow a more idiomatic Kotlin usage of Reactor APIs.

Usage

Java Kotlin with extensions
Mono.just("foo") "foo".toMono()
Flux.fromIterable(list) list.toFlux()
Mono.error(new RuntimeException()) RuntimeException().toMono()
Flux.error(new RuntimeException()) RuntimeException().toFlux()
flux.ofType(Foo.class) flux.ofType<Foo>() or flux.ofType(Foo::class)
StepVerifier.create(flux).verifyComplete() flux.test().verifyComplete()

Check API documentation for the full list of extensions.

See these unit tests for more code examples:

Dependency

Release

  • Repository: https://repo.spring.io/milestone
  • Artifact: io.projectreactor:reactor-kotlin-extensions:1.0.0.M2

Snapshot

  • Repository: https://repo.spring.io/snapshot
  • Artifact: io.projectreactor:reactor-kotlin-extensions:1.0.0.BUILD-SNAPSHOT

About

Some extensions are inspired from RxKotlin.

This project is Apache 2.0 licensed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].