RxJavaReactiveStreams

Adapter between RxJava and ReactiveStreams. 「RxJava 和 ReactiveStream 之间的适配器」

Github stars Tracking Chart

RxJava Reactive Streams

Reactive Streams 是为无阻塞背压的异步流处理提供标准的一项举措。 这包括针对运行时环境(JVM 和 JavaScript)以及网络协议的工作。

该库提供 RxJava 和 Reactive Streams 之间的适配器。 Reactive Streams 标准为响应式数据流(reactive data streams)定义了 API 和运行时语义,不同的工具可以实现这些 API 以便相互操作。 该库允许 RxJava 与 Reactive Streams API 的其他实现者进行互操作。

它提供以下API:

package rx;
import org.reactivestreams.Publisher;
public abstract class RxReactiveStreams {
    public static <T> Publisher<T> toPublisher(Observable<T> observable) { … }
    public static <T> Observable<T> toObservable(Publisher<T> publisher) { … }
    public static <T> Publisher<T> toPublisher(Single<T> observable) { … }
    public static <T> Single<T> toSingle(Publisher<T> publisher) { … }
    public static <T> Publisher<T> toPublisher(Completable observable) { … }
    public static Completable toCompletable(Publisher<?> publisher) { … }
}

这些方法可用于在Reactive Streams Publisher类型和RxJava的Observable类型之间进行转换。

该库用于互操作的一些示例可作为该存储库的一部分获得。

请访问Reactive Streams网站,以获取实现Reactive Streams API的其他库的链接,因此可以通过这些方法与RxJava进行互操作。

在Wiki主页和引入RxJava的Netflix TechBlog帖子上了解有关RxJava的更多信息。

通讯

二进制文件

Maven、Ivy、Gradle等的二进制文件和依赖信息可以在 http://search.maven.org 上找到。

Maven 的示例:

<dependency>
    <groupId>io.reactivex</groupId>
    <artifactId>rxjava-reactive-streams</artifactId>
    <version>x.y.z</version>
</dependency>

lvy 的示例

<dependency org="io.reactivex" name="rxjava-reactive-streams" rev="x.y.z" />

构建

构建方法

$ git clone git@github.com:ReactiveX/RxJavaReactiveStreams.git
$ cd RxJavaReactiveStreams/
$ ./gradlew build

错误和反馈

对于错误,问题和讨论,请使用 Github Issues

许可

根据 Apache 许可证 2.0 版(“许可证”)获得许可; 除非遵守许可,否则不得使用此文件。 您可以在以下位置获得许可的副本:

http://www.apache.org/licenses/LICENSE-2.0

除非适用法律要求或以书面形式达成协议,否则根据“许可”分发的软件均按“原样”分发,没有任何明示或暗示的保证或条件。 有关许可下特定的语言管理权限和限制,请参阅许可。

Main metrics

Overview
Name With OwnerReactiveX/RxJavaReactiveStreams
Primary LanguageJava
Program languageJava (Language Count: 2)
PlatformCross-platform, Linux, Mac, Solaris, Unix-like, Windows
License:Apache License 2.0
所有者活动
Created At2014-08-30 07:23:11
Pushed At2018-02-12 11:32:43
Last Commit At
Release Count11
Last Release Namev1.2.1 (Posted on )
First Release Namev0.1.0 (Posted on 2014-09-30 19:22:34)
用户参与
Stargazers Count234
Watchers Count21
Fork Count31
Commits Count92
Has Issues Enabled
Issues Count16
Issue Open Count1
Pull Requests Count16
Pull Requests Open Count0
Pull Requests Close Count4
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

RxJava Reactive Streams


codecov.io
Maven Central

This library provides adapters between RxJava and Reactive Streams.
The Reactive Streams standard defines an API and runtime semantics for reactive data streams, that different tools can implement in order to interoperate with each other.
This library allows RxJava to interoperate with other implementors of the Reactive Streams API.

It provides the following API:

package rx;

import org.reactivestreams.Publisher;

public abstract class RxReactiveStreams {

    public static <T> Publisher<T> toPublisher(Observable<T> observable) { … }

    public static <T> Observable<T> toObservable(Publisher<T> publisher) { … }

    public static <T> Publisher<T> toPublisher(Single<T> observable) { … }

    public static <T> Single<T> toSingle(Publisher<T> publisher) { … }

    public static <T> Publisher<T> toPublisher(Completable observable) { … }

    public static Completable toCompletable(Publisher<?> publisher) { … }

}

These methods can be used to convert between the Reactive Streams Publisher type, and RxJava's Observable type.

Some examples of this library being used for interop are available as part of this repository.

See the Reactive Streams website for links to other libraries that implement the Reactive Streams API,
and can therefore interoperate with RxJava via these methods.

Learn more about RxJava on the Wiki Home and the Netflix TechBlog post where RxJava was introduced.

Communication

Binaries

Binaries and dependency information for Maven, Ivy, Gradle and others can be found at http://search.maven.org.

Example for Maven:

<dependency>
    <groupId>io.reactivex</groupId>
    <artifactId>rxjava-reactive-streams</artifactId>
    <version>x.y.z</version>
</dependency>

and for Ivy:

<dependency org="io.reactivex" name="rxjava-reactive-streams" rev="x.y.z" />

Build

To build:

$ git clone git@github.com:ReactiveX/RxJavaReactiveStreams.git
$ cd RxJavaReactiveStreams/
$ ./gradlew build

Bugs and Feedback

For bugs, questions and discussions please use the Github Issues.

LICENSE

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.