Scala wrapper for reactor-core

A Scala wrapper for reactor-core so that the code can be fluently used in Scala

License

License

Categories

Categories

Scala Languages React User Interface Web Frameworks Reactor Container Microservices Reactive libraries
GroupId

GroupId

com.github.sinwe
ArtifactId

ArtifactId

reactor-core-scala
Last Version

Last Version

0.2.2
Release Date

Release Date

Type

Type

jar
Description

Description

Scala wrapper for reactor-core
A Scala wrapper for reactor-core so that the code can be fluently used in Scala
Project URL

Project URL

https://sinwe.github.io/reactor-core-scala/
Source Code Management

Source Code Management

https://github.com/sinwe/reactor-core-scala

Download reactor-core-scala

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.sinwe/reactor-core-scala/ -->
<dependency>
    <groupId>com.github.sinwe</groupId>
    <artifactId>reactor-core-scala</artifactId>
    <version>0.2.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.sinwe/reactor-core-scala/
implementation 'com.github.sinwe:reactor-core-scala:0.2.2'
// https://jarcasting.com/artifacts/com.github.sinwe/reactor-core-scala/
implementation ("com.github.sinwe:reactor-core-scala:0.2.2")
'com.github.sinwe:reactor-core-scala:jar:0.2.2'
<dependency org="com.github.sinwe" name="reactor-core-scala" rev="0.2.2">
  <artifact name="reactor-core-scala" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.sinwe', module='reactor-core-scala', version='0.2.2')
)
libraryDependencies += "com.github.sinwe" % "reactor-core-scala" % "0.2.2"
[com.github.sinwe/reactor-core-scala "0.2.2"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.8
io.projectreactor : reactor-core jar 3.0.5.RELEASE
com.google.code.findbugs : jsr305 jar 3.0.1

test (3)

Group / Artifact Type Version
org.scalatest : scalatest_2.11 jar 3.0.1
io.projectreactor.addons : reactor-test jar 3.0.5.RELEASE
org.pegdown : pegdown jar 1.6.0

Project Modules

There are no modules declared in this project.

Reactor Core Scala

This project has a new home. It is now hosted at https://github.com/reactor/reactor-scala-extensions

Join the chat at https://gitter.im/reactor/reactor Reactor Core Scala Travis CI codecov Dependencies

This project is a Scala wrapper for reactor-core.

This project was created after I can't find any Scala code for reactor-core project. Using reactor-core project as it is in scala code will look ugly because a lot of methods use Java 8 lambda which is not compatible with Scala lambda. This will force Scala code to use anonymous class which turns ugly.

So instead of

val mono = Mono.just(1)
               .map(new java.util.function.Function[Int, String] {
                   def apply(t: Int): String = t.toString
               })

it becomes

val mono = Mono.just(1).map(_.toString)

Getting it

It is still in preliminary stage and requires a lot of refinement. No release has been made so far. Those who wanted to try, can get the SNAPSHOT version from snapshot repository as below:

With Gradle:

repositories {
    //maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
    mavenCentral()
}

dependencies {
    //compile "com.github.sinwe:reactor-core-scala:0.2.3-SNAPSHOT
    compile "com.github.sinwe:reactor-core-scala:0.2.2
}

With Maven:

<!-- To get latest SNAPSHOT version from Sonatype
<repositories>
    <repository>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <id>ossSonatypeSnapshot</id>
        <name>OSS Sonatype Snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        <layout>default</layout>
    </repository>
 </repositories>

<dependency>
    <groupId>com.github.sinwe</groupId>
    <artifactId>reactor-core-scala</artifactId>
    <version>0.2.3-SNAPSHOT</version>
</dependency>
-->
<dependency>
    <groupId>com.github.sinwe</groupId>
    <artifactId>reactor-core-scala</artifactId>
    <version>0.2.2</version>
</dependency>

Contributing

Contributions are welcome. Simply fork this project, make some modification, push and create a pull request.

Versions

Version
0.2.2
0.1.9
0.1.8