| 1 |
/* |
| 2 |
* Copyright (c) 2016-present, RxJava Contributors. |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in |
| 5 |
* compliance with the License. You may obtain a copy of the License at |
| 6 |
* |
| 7 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
* |
| 9 |
* Unless required by applicable law or agreed to in writing, software distributed under the License is |
| 10 |
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See |
| 11 |
* the License for the specific language governing permissions and limitations under the License. |
| 12 |
*/ |
| 13 |
|
| 14 |
/** |
| 15 |
* Base reactive classes: {@link io.reactivex.rxjava3.core.Flowable}, {@link io.reactivex.rxjava3.core.Observable}, |
| 16 |
* {@link io.reactivex.rxjava3.core.Single}, {@link io.reactivex.rxjava3.core.Maybe} and |
| 17 |
* {@link io.reactivex.rxjava3.core.Completable}; base reactive consumers; |
| 18 |
* other common base interfaces. |
| 19 |
* |
| 20 |
* <p>A library that enables subscribing to and composing asynchronous events and |
| 21 |
* callbacks.</p> |
| 22 |
* <p>The Flowable/Subscriber, Observable/Observer, Single/SingleObserver and |
| 23 |
* Completable/CompletableObserver interfaces and associated operators (in |
| 24 |
* the {@code io.reactivex.internal.operators} package) are inspired by the |
| 25 |
* Reactive Rx library in Microsoft .NET but designed and implemented on |
| 26 |
* the more advanced Reactive-Streams ( http://www.reactivestreams.org ) principles.</p> |
| 27 |
* <p> |
| 28 |
* More information can be found at <a |
| 29 |
* href="http://msdn.microsoft.com/en-us/data/gg577609">http://msdn.microsoft.com/en-us/data/gg577609</a>. |
| 30 |
* </p> |
| 31 |
* |
| 32 |
* |
| 33 |
* <p>Compared with the Microsoft implementation: |
| 34 |
* <ul> |
| 35 |
* <li>Observable == IObservable (base type)</li> |
| 36 |
* <li>Observer == IObserver (event consumer)</li> |
| 37 |
* <li>Disposable == IDisposable (resource/cancellation management)</li> |
| 38 |
* <li>Observable == Observable (factory methods)</li> |
| 39 |
* <li>Flowable == IAsyncEnumerable (backpressure)</li> |
| 40 |
* <li>Subscriber == IAsyncEnumerator</li> |
| 41 |
* </ul> |
| 42 |
* The Single and Completable reactive base types have no equivalent in Rx.NET as of 3.x. |
| 43 |
* |
| 44 |
* <p>Services which intend on exposing data asynchronously and wish |
| 45 |
* to allow reactive processing and composition can implement the |
| 46 |
* {@link io.reactivex.rxjava3.core.Flowable}, {@link io.reactivex.rxjava3.core.Observable}, {@link io.reactivex.rxjava3.core.Single}, |
| 47 |
* {@link io.reactivex.rxjava3.core.Maybe} or {@link io.reactivex.rxjava3.core.Completable} class which then allow |
| 48 |
* consumers to subscribe to them and receive events.</p> |
| 49 |
* <p>Usage examples can be found on the {@link io.reactivex.rxjava3.core.Flowable}/{@link io.reactivex.rxjava3.core.Observable} and {@link org.reactivestreams.Subscriber} classes.</p> |
| 50 |
*/ |
| 51 |
package io.reactivex.rxjava3.core; |
| 52 |
|