All Projects → JohnnyShieh → RxBus

JohnnyShieh / RxBus

Licence: Apache-2.0 license
Rx event bus based on RxRelay and custom observer

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to RxBus

Xsnow
💮基于RxJava2+Retrofit2精心打造的Android基础框架,包含网络、上传、下载、缓存、事件总线、权限管理、数据库、图片加载,基本都是项目中必用功能,每个模块充分解耦,可自由拓展。
Stars: ✭ 1,678 (+10387.5%)
Mutual labels:  rxjava2, rxbus
Rxbus
Event Bus By RxJava.
Stars: ✭ 2,126 (+13187.5%)
Mutual labels:  rxjava2, rxbus
Awesome Wanandroid
⚡致力于打造一款极致体验的 http://www.wanandroid.com/ 客户端,知识和美是可以并存的哦QAQn(*≧▽≦*)n
Stars: ✭ 2,525 (+15681.25%)
Mutual labels:  rxjava2, rxbus
RestaurantsExplorer
Android application build with MVVM Pattern, using Zomato API to enable search cities arround the world and display the city restaurants on a map.
Stars: ✭ 32 (+100%)
Mutual labels:  rxjava2
blueprint
Architectural frameworks and toolkits for bootstrapping modern Android codebases.
Stars: ✭ 57 (+256.25%)
Mutual labels:  rxjava2
Eva
Eva and Wall-e
Stars: ✭ 131 (+718.75%)
Mutual labels:  rxjava2
Pursuit-Core-Android
Pursuit Core Android
Stars: ✭ 45 (+181.25%)
Mutual labels:  rxjava2
RxKata
Learn Rx through Katas and exercises
Stars: ✭ 19 (+18.75%)
Mutual labels:  rxjava2
RxBus
🍾 标签/线程/Kotlin/自动注销的RxBus
Stars: ✭ 25 (+56.25%)
Mutual labels:  rxbus
ObservableCache
Library for caching Observables during orientation change
Stars: ✭ 21 (+31.25%)
Mutual labels:  rxjava2
helloworld
Boilerplate code for basic architecture of an android application following MVVM pattern using hilt, RxJava2.
Stars: ✭ 26 (+62.5%)
Mutual labels:  rxjava2
stockwatcher
stockwatcher, a modern android development stack showcase
Stars: ✭ 62 (+287.5%)
Mutual labels:  rxjava2
J-Curry
A Java library that enables applying Functional Programming concepts like currying and partial application for functions, also it supports types like Either, Try, etc... using RxJava 2 interfaces, compatible with Java 7 and above
Stars: ✭ 17 (+6.25%)
Mutual labels:  rxjava2
RxPager
RxPager is an Android library that helps handling paginated results in a reactive way
Stars: ✭ 56 (+250%)
Mutual labels:  rxjava2
AndroidVIP
Android project to experiment the VIPER approach using mosby, RxJava and dagger2
Stars: ✭ 21 (+31.25%)
Mutual labels:  rxjava2
Android-Starter-Kit
This is up-to-date android studio project for native android application, that is using modern tools and libraries.
Stars: ✭ 16 (+0%)
Mutual labels:  rxjava2
RxLogs
An Android & Kotlin Reactive Advanced Logging Framework.
Stars: ✭ 12 (-25%)
Mutual labels:  rxjava2
reactive-streams-in-java
Code for "Reactive Streams in Java" book
Stars: ✭ 19 (+18.75%)
Mutual labels:  rxjava2
java-modern-tech-practice
😎 Java™ modern tech practice sandbox ⏳
Stars: ✭ 43 (+168.75%)
Mutual labels:  rxjava2
TeamManagerApp
A sample app structure using the MVVM architecture LiveData, RxJava, ViewModel, Room and the Navigation Arch Components.
Stars: ✭ 36 (+125%)
Mutual labels:  rxjava2

RxBus

RxBus are RxJava event bus which based on RxRelay and custom LambdaObserver.

RxBus has the following features:

  • Observer can only receive items which was emited after subscribed the RxBus.

  • Bus never emits error and complete items.

  • Don't worry about exception throwed in onNext method of Observer.

  • Thread safe.

ObservableUtils utils class can guarantee that Observer can normally receive item after throwing exception in onNext method and then jump to onError method.

Usage

RxBus.get()
    .toObservable(String.class)
    .subscribe(observer1);
// observer1 will receive all string items.

Consumer<String> onNext = new Consumer<String>() {
    @Override
    public void accept(String value) {
        if ("error".equals(value)) throw new IllegalArgumentException("value can not be error !");
        ...
    }
};
// observer2 will throw exception when receive "error" string. after that observer2 can also receive items.
ObservableUtils.subscribe(RxBus.get().toObservable(String.class), onNext);

RxBus.get().post("one");
RxBus.get().post("error");
RxBus.get().post("three");

// observer1 will receive all string items: one, error, three
// observer2 will receive all string items: one, error, three

Download

Gradle:

compile 'com.johnnyshieh.rxbus:rxbus2:1.0.0'

License

Copyright 2017 Johnny Shieh

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].