
com.staticbloc.events.Events Maven / Gradle / Ivy
package com.staticbloc.events;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class Events {
private static EventDispatcherFactory eventDispatcherFactory = getEventDispatcherFactory();
private static EventDispatcherFactory getEventDispatcherFactory() {
try {
return (EventDispatcherFactory) Class.forName("com.staticbloc.events.EventDispatcherFactoryImpl").getConstructor().newInstance();
}
catch (Exception e) {
Log.wtf("Events", "Couldn't find EventDispatcherFactoryImpl. Please email [email protected] for assistance", e);
throw new RuntimeException(e);
}
}
/**
* The default instance
*/
private static class Singleton {
public static final Events instance = new Events();
}
private static final Handler mainPoster = new Handler(Looper.getMainLooper());
private static final ExecutorService defaultEventDispatcher = Executors.newSingleThreadExecutor();
private final Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy