Skip to content

A bunch of useful operators, utils, wrapper for RxJava2 write in Kotlin

Notifications You must be signed in to change notification settings

TimoPtr/rxjava-sample

Repository files navigation

Samples for RxJava2

Project base on kotlin-base-project

DebounceBuffer

This combination of operator allow you to debounce the upstream with a given timeout and emit after another given timeout if no value send.

Use case : A source of ByteArray (for instance a Bluetooth Device which send a bunch of data), and a huge consuming parser (take care of potential lost of data), this operator will be useful to avoid calling the parser on every bunch of data (the message might be split) but after a certain amount of time between two reception or after a global timeout if there is no delay between two reception (avoid deadlock).

Implementation

DebounceBuffer

Sample

DebounceBufferSample

MergeAllowError

This operator merge all the sources and doesn't failed unless all sources emit an error.

Use case : Connect to multiple interface, and you don't care if one of them is disconnected

Implementation

MergeAllowError

Sample

MergeAllowErrorSample

Wrapper MQTT

This is a simple wrapper around the paho library which expose Observable

Implementation

RxMqttClient

Sample

RxMqttClientSample

WebSocket

This is a simple wrapper around the okhttp library which expose Observable

Implementation

RxWebSocketClient

Sample

RxMqttClientSample

RxBroadcastReceiver

This is a simple wrapper to listen on broadcast on Android platform

RxBroadcastReceiver

About

A bunch of useful operators, utils, wrapper for RxJava2 write in Kotlin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages