package com.frame.base.bus;

import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;

public abstract class Observer<T> implements io.reactivex.Observer<T> {

    CompositeDisposable compositeDisposable;

    public Observer(CompositeDisposable compositeDisposable){
        this.compositeDisposable = compositeDisposable;
    }

    @Override
    public void onSubscribe(Disposable d){
        compositeDisposable.add(d);
    }

    @Override
    public void onError(Throwable e){

    }

    @Override
    public void onComplete(){

    }

}
