All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.activeandroid.rxschedulers.RxAndroidSchedulersHook Maven / Gradle / Ivy

There is a newer version: 3.1.5
Show newest version
package com.activeandroid.rxschedulers;

import rx.Scheduler;
import rx.functions.Action0;

public class RxAndroidSchedulersHook {
    private static final RxAndroidSchedulersHook DEFAULT_INSTANCE = new RxAndroidSchedulersHook();

    public static RxAndroidSchedulersHook getDefaultInstance() {
        return DEFAULT_INSTANCE;
    }

    /**
     * Scheduler to return from {@link AndroidSchedulers#mainThread()} or {@code null} if default
     * should be used.
     * 

* This instance should be or behave like a stateless singleton. */ public Scheduler getMainThreadScheduler() { return null; } /** * Invoked before the Action is handed over to the scheduler. Can be used for * wrapping/decorating/logging. The default is just a passthrough. * * @param action action to schedule * @return wrapped action to schedule */ public Action0 onSchedule(Action0 action) { return action; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy