Questions tagged [reactivex]

ReactiveX is a library for composing asynchronous and event-based programs by using observable sequences.

From reactivex.io:

It extends the observer pattern to support sequences of data and/or events and adds operators that allow you to compose sequences together declaratively while abstracting away concerns about things like low-level threading, synchronization, thread-safety, concurrent data structures, and non-blocking I/O.

688 questions
0
votes
1 answer

Observable from lazy initialized field

I have this class. I’d like, the client of this class gets the instance of the field chatHub as soon as chatHub assigned in the callback connection.connected(() -> chatHub = connection.createHubProxy("ChatHub")); chatHub might be null. We have to…
beka
  • 11
  • 3
0
votes
2 answers

Merged observable does not contain sequence even though mergees do

I've got a function that essentially takes a DOM element, looks for some identifying stuff, and (in theory) returns an Observable that contains the aforementioned identifying stuff withLatestFromed with some other stuff. My problem is that the…
dontexist
  • 5,252
  • 4
  • 27
  • 51
0
votes
1 answer

reactivex java creating a custom observer that emits events at some random time in the future

I am trying to figure out how to create an async observer and trigger/emit events at some time in the future without rebuilding the observable and the subscriber list. Looking for something like: MyAsyncObservable o = new…
Jose Diaz
  • 13
  • 4
0
votes
1 answer

ReactiveX Self-Cancelling Timer

I want to create an extension method of the form: IObservable CancellableTimer( this IObservable source, TimeSpan delay ) { ... } which produces a sequence which is always false when the source is, but will go true when the source sequence…
bighairdave
  • 592
  • 5
  • 19
0
votes
1 answer

Collecting the currently incomplete observables in a higher-order rxjs observable

For example, I have an observable that emits a 10-second timer every 5 seconds. I can use scan to create an observable that emits an array of all the inner observables emitted so far: tick = 5000 tock = 1000 timers = Observable.interval(tick).scan(…
Coquelicot
  • 8,775
  • 6
  • 33
  • 37
0
votes
2 answers

How to user ReactiveX to execute async's in sequence

How do I leverage ReactiveX to execute async calls in sequence? I.e., execute a second call after first one has finished. More specifically, I'm working with RxSwift in iOS, and the asyncs I want to chain together are UIView animations (instead of…
Rodrigo Ruiz
  • 4,248
  • 6
  • 43
  • 75
0
votes
2 answers

How can I call multiple observable calls asynchronously, yet synchronously do some computation before and after those calls?

I'm new to RxJava. I have a few Jersey RxJava clients that return Observables. I need to make one call to get some data, that data becomes the input to my next 3 calls. I want those calls to be made in parallel. Finally, I want to do a calculation…
Adam
  • 43,763
  • 16
  • 104
  • 144
0
votes
1 answer

Fail fo fetch observable changes

I have a report.service.ts that have one simple method to get reports (which is just a const array of reports object from a mock), and all it really does is this: @Injectable() export class ReportService { getReports() { var ret =…
jack miao
  • 1,398
  • 1
  • 16
  • 32
0
votes
0 answers

Identify subscribers during subscription

Assume that I have some subscriber implementation: // SafeSubscriber extension doesn't matter here - the problem exists for simple Subscriber implementations too class ParticularSubscriber extends SafeSubscriber { private Subscriber
skapral
  • 1,128
  • 9
  • 26
0
votes
3 answers

Limit actions with rxJava and retryWhen operator

My application must do two things in general: Accept only one network request at the same time Retry if request failed That's how I implement it: public class RequestsLocker { private volatile boolean isLocked; public
Alexandr
  • 3,859
  • 5
  • 32
  • 56
0
votes
0 answers

Now getting my Observable value in the requested time

I declared an Observable: isOn: Observable; in onInit I did: this.isOn = this.manager.currentState.map(state => state === StateType.typeOn); and now I wanted to be able to update some input in the html file so to be able to sample it I…
Joe
  • 2,543
  • 3
  • 25
  • 49
0
votes
1 answer

How to convert Observable array of a type to Observable array of a different type with RxSwift

I'm new to RxSwift and I came across the next situation: self.viewModel!.country .flatMapLatest { country -> Observable in country!.cities!.toObservable() } .map { city -> SectionModel in …
dRamentol
  • 1,010
  • 10
  • 13
0
votes
1 answer

Wrapping observables within action of another observable

I just started on ReactiveX and Retrofit, Consider following example retrofit example, @GET public Observable makeFirstCall(); @POST public Observable
Hareesh
  • 694
  • 6
  • 18
0
votes
1 answer

RxJava retryWhen and onError

I am starting to developing using rxJava, and I have the following situation: I have a observable and I want to have one subscriber to handle the error onError, and other subscriber to handle the retryWhen. The retryWhen swallow the error, how avoid…
Guilherme Torres Castro
  • 15,135
  • 7
  • 59
  • 96
0
votes
2 answers

ReactiveX Retry with Multiple Consumers

Quick question, because I feel like I must be missing something. I'm using rxjs here because it's what I've got in-front of me, this is a general reactiveX question, I believe. Let's say I have a set of Observables like so: network_request =…
psycotica0
  • 3,130
  • 2
  • 19
  • 16