You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lazy representation of a unit of work that can complete or fail
230
223
231
-
- Semantic equivalent of `Observable.empty().doOnSubscribe()`.
224
+
- Semantic equivalent of `Observable.empty().doOnSubscribe()`.
232
225
- Alternative for scenarios often represented with types such as `Single<Void>` or `Observable<Void>`.
233
226
234
227
Usable for:
@@ -241,12 +234,12 @@ Usable for:
241
234
```java
242
235
classCompletable {
243
236
voidsubscribe(Completable.Subscribersubscriber);
237
+
}
244
238
245
-
interfaceSubscriber {
246
-
voidonComplete();
247
-
voidonError(Throwablet);
248
-
voidonSubscribe(Disposabled);
249
-
}
239
+
interfaceCompletableSubscriber {
240
+
voidonComplete();
241
+
voidonError(Throwablet);
242
+
voidonSubscribe(Disposabled);
250
243
}
251
244
```
252
245
@@ -272,7 +265,7 @@ Interactive consumer of events (with consumer-driven flow control). Involved in
272
265
273
266
[Reactive Streams state](https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.0/README.md#3-subscription-code) of subscription supporting flow control and cancellation.
274
267
275
-
`Disposable` is a similar type used for lifecycle management on the `Observable` type without interactive flow control.
268
+
`Disposable` is a similar type used for lifecycle management on the `Observable` type without interactive flow control.
276
269
277
270
##### Processor
278
271
@@ -298,7 +291,7 @@ Subject s = PublishSubject.create();
298
291
Publisher p = s.toPublisher(onBackpressureStrategy);
299
292
300
293
// now the request(n) semantics are handled by default
301
-
p.subscribe(subscriber1);
294
+
p.subscribe(subscriber1);
302
295
p.subscribe(subscriber2);
303
296
```
304
297
@@ -307,11 +300,11 @@ In this example, `subscriber1` and `subscriber2` can consume at different rates,
307
300
308
301
##### Disposable
309
302
310
-
A type representing work that can be cancelled or disposed.
303
+
A type representing work or resource that can be cancelled or disposed.
311
304
312
305
Examples:
313
306
314
-
- An `Observable.subscribe` passes a `Disposable` to the `Observable.onSubscribe` to allow the `Observer` to dispose of the subscription.
307
+
- An `Observable.subscribe` passes a `Disposable` to the `Observable.onSubscribe` to allow the `Observer` to dispose of the subscription.
315
308
- A `Scheduler` returns a `Disposable` that you use for disposing of the `Scheduler`.
316
309
317
310
`Subscription` is a similar type used for lifecycle management on the `Flowable` type with interactive flow control.
@@ -356,27 +349,15 @@ The final `subscribe` will *not* invoke `cancel`/`dispose` after receiving an `o
356
349
357
350
### JVM target and source compatibility
358
351
359
-
The 2.x version will target JDK6+ but the source will be using some of the Java 8 features.
360
-
We'll use the retrolambda project to generate JDK6 Byte-code from the Java 8 sources.
361
-
The only Java 8 features we intend to use are: lambda expressions, method references and try-with-resources statements.
362
-
Default methods may be considered if retrolambda support reach an acceptable level of maturity.
363
-
364
-
It still up to discussion to know how we will generate multiple targets?
365
-
Options are:
366
-
367
-
- two artifcat ids: rxjava-jdk6, rxjava-jdk8
368
-
- classifiers: jdk6, jdk8
369
-
370
-
The intent is to let Android users consume the new version of RxJava.
371
-
(Not sure if JDK6 is the appropriate requirement, JDK7+ is maybe sufficient).
352
+
The 2.x version will target JDK6+ to let Android users consume the new version of RxJava.
372
353
373
-
### Future work
354
+
### Future work
374
355
375
-
This section contains current design work which needs more discussion and elaboration before it is merged into this document as a stated goal for 2.x. Our goal is
356
+
This section contains current design work which needs more discussion and elaboration before it is merged into this document as a stated goal for 2.x.
376
357
377
358
#### Custom Observable, Single, Completable, or Flowable
378
359
379
-
We are investigate a base interface (similar to `Publisher`) for the `Observable`, `Single`, and `Completable` (currently referred to as `Consumable` or `ConsumableObservable`). This would empower library owners and api developers to implement their own type of `Observable`, `Single`, or `Completable` without extending the class. This would result in a change the type signatures of `subscribe` as well as any operator that operates over an `Observable`, `Single`, or `Completable` to accept a more generic type (i.e. `ConsumableObservable`). For more information see the proof of concept project [Consumable](https://github.com/stealthcode/Consumable).
360
+
We are investigate a base interface (similar to `Publisher`) for the `Observable`, `Single`, and `Completable` (currently referred to as `Consumable` or `ConsumableObservable`). This would empower library owners and api developers to implement their own type of `Observable`, `Single`, or `Completable` without extending the class. This would result in a change the type signatures of `subscribe` as well as any operator that operates over an `Observable`, `Single`, or `Completable` to accept a more generic type (i.e. `ConsumableObservable`). For more information see the proof of concept project [Consumable](https://github.com/stealthcode/Consumable).
0 commit comments