Newer
Older
RxFlux / app / src / main / java / j4ckall / rxflux / App.java
package j4ckall.rxflux;

import android.app.Application;

import j4ckall.rxflux.lib.flux.Dispatcher;
import j4ckall.rxflux.repository.RegistrationRepository;

/**
 * Application Class
 *
 * @author matsumoto_k
 */
public class App extends Application {

    private static App instance = null;
    private static final Dispatcher dispatcher = new Dispatcher();
    private static final RegistrationRepository registrationRepository = new RegistrationRepository();

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
    }

    public static App get() {
        return instance;
    }

    public static Dispatcher getDispatcher() {
        return dispatcher;
    }

    public static RegistrationRepository getRegistrationRepository() {
        return registrationRepository;
    }
}