Android Open Source - rxloader Rx Loader Observer






From Project

Back to project page rxloader.

License

The source code is released under:

Apache License

If you think the Android project rxloader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package me.tatarka.rxloader;
/*from  w  w  w . ja v a 2 s  .c o  m*/
import rx.Observer;

/**
 * A specialized {@link rx.Observer} that can also respond to when it's subscribed.
 *
 * @param <T> the observer value type
 */
public abstract class RxLoaderObserver<T> implements Observer<T> {
    /**
     * Called either when the {@link rx.Observer} is subscribed to or when there is the
     * configuration change and the {@code Observer} has not completed. This is where you would show
     * that you are loading something.
     */
    public void onStarted() {

    }

    /**
     * Called either when the {@link rx.Observer} delivers a value or when there is a configuration
     * change and the {@code Observer} has delivered a value. If multiple values have been
     * delivered, only the last one will be re-sent. This is where you would show the result of your
     * async call.
     *
     * @param value the value
     */
    @Override
    public abstract void onNext(T value);

    /**
     * Called either when the {@link rx.Observer} completes or when there is a configuration change
     * and the {@code Observer} has been closed. This is where you would show that your async call
     * has completed.
     */
    @Override
    public void onCompleted() {

    }

    /**
     * Called either when the {@link rx.Observer} has an error or when there is a configuration
     * change and the {@code Observer} has received an error. This is where you would display the
     * error.
     *
     * @param e the error
     */
    @Override
    public void onError(Throwable e) {

    }
}




Java Source Code List

me.tatarka.rxloader.BaseRxLoader.java
me.tatarka.rxloader.CachingWeakRefSubscriber.java
me.tatarka.rxloader.ParcelableSaveCallback.java
me.tatarka.rxloader.RxLoader1.java
me.tatarka.rxloader.RxLoader2.java
me.tatarka.rxloader.RxLoaderBackendFragmentCompat.java
me.tatarka.rxloader.RxLoaderBackendFragmentHelper.java
me.tatarka.rxloader.RxLoaderBackendFragment.java
me.tatarka.rxloader.RxLoaderBackendNestedFragmentCompat.java
me.tatarka.rxloader.RxLoaderBackendNestedFragment.java
me.tatarka.rxloader.RxLoaderBackend.java
me.tatarka.rxloader.RxLoaderManagerCompat.java
me.tatarka.rxloader.RxLoaderManager.java
me.tatarka.rxloader.RxLoaderObserver.java
me.tatarka.rxloader.RxLoader.java
me.tatarka.rxloader.SaveCallback.java
me.tatarka.rxloader.sample.MainActivityWithFragment.java
me.tatarka.rxloader.sample.MainActivityWithViewPager.java
me.tatarka.rxloader.sample.MainActivity.java
me.tatarka.rxloader.sample.MainFragment.java
me.tatarka.rxloader.sample.SampleObservables.java