- RxJava - Discussion
- RxJava - Useful Resources
- RxJava - Quick Guide
- RxJava - Windowing
- RxJava - Buffering
- RxJava - From Scheduler
- RxJava - IO Scheduler
- RxJava - Computation Scheduler
- RxJava - NewThread Scheduler
- RxJava - Trampoline Scheduler
- RxJava - Schedulers
- RxJava - AsyncSubject
- RxJava - ReplaySubject
- RxJava - BehaviorSubject
- RxJava - PublishSubject
- RxJava - Subjects
- RxJava - Connectable Operators
- RxJava - Mathematical Operators
- RxJava - Conditional Operators
- RxJava - Utility Operators
- RxJava - Combining Operators
- RxJava - Filtering Operators
- RxJava - Transforming Operators
- RxJava - Creating Operators
- RxJava - Using CompositeDisposable
- RxJava - Completable Observable
- RxJava - MayBe Observable
- RxJava - Single Observable
- RxJava - Creating Observables
- RxJava - How Observable works
- RxJava - Environment Setup
- RxJava - Overview
- RxJava - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
RxJava - Creating Observables
Following are the base classes to create observables.
Flowable − 0..N flows, Emits 0 or n items. Supports Reactive-Streams and back-pressure.
Observable − 0..N flows ,but no back-pressure.
Single − 1 item or error. Can be treated as a reactive version of method call.
Completable − No item emitted. Used as a signal for completion or error. Can be treated as a reactive version of Runnable.
MayBe − Either No item or 1 item emitted. Can be treated as a reactive version of Optional.
Following are the convenient methods to create observables in Observable class.
just(T item) − Returns an Observable that signals the given (constant reference) item and then completes.
fromIterable(Iterable source) − Converts an Iterable sequence into an ObservableSource that emits the items in the sequence.
fromArray(T... items) − Converts an Array into an ObservableSource that emits the items in the Array.
fromCallable(Callable suppper) − Returns an Observable that, when an observer subscribes to it, invokes a function you specify and then emits the value returned from that function.
fromFuture(Future future) − Converts a Future into an ObservableSource.
interval(long initialDelay, long period, TimeUnit unit) − Returns an Observable that emits a 0L after the initialDelay and ever increasing numbers after each period of time thereafter.