Skip to content

Commit

Permalink
yoyiyi
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyiyi committed Jul 27, 2017
1 parent a33c367 commit ef5459c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/main/java/com/yoyiyi/soleil/rx/RxBus.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package com.yoyiyi.soleil.rx;

import io.reactivex.Flowable;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
Expand All @@ -11,7 +12,7 @@
* @date 创建时间:2017/4/7 15:50
* 描述:RxBus类
*/
public enum RxBus {
public enum RxBus {
INSTANCE;

private final FlowableProcessor<Object> bus;
Expand All @@ -29,6 +30,8 @@ public void post(Object o) {
// 根据传递的 eventType 类型返回特定类型(eventType)的 被观察者
public <T> Flowable<T> toFlowable(Class<T> eventType) {
return bus.ofType(eventType);


}

//封装默认订阅
Expand Down

0 comments on commit ef5459c

Please sign in to comment.