// Path: data/src/main/java/com/sloydev/redbooth/data/executor/InteractorExecutor.java
// public class InteractorExecutor implements InteractorHandler {
// 
//     private final Handler responseHandler;
// 
//     @Override public void execute(Interactor interactor) {
//         if (interactor == null) {
//             throw new IllegalArgumentException("Interactor to execute cannot be null");
//         }
//         this.threadPoolExecutor.execute(interactor);
//     }
// 
//     @Override public void postResponse(Runnable responseRunnable) {
//         responseHandler.post(responseRunnable);
//     }
// 
//     private static final int INITIAL_POOL_SIZE = 3;
//     private static final int MAX_POOL_SIZE = 5;
// 
//     // Sets the amount of time an idle thread waits before terminating
//     private static final int KEEP_ALIVE_TIME = 10;
// 
//     // Sets the Time Unit to seconds
//     private static final TimeUnit KEEP_ALIVE_TIME_UNIT = TimeUnit.SECONDS;
// 
//     private final BlockingQueue<Runnable> workQueue;
// 
//     private final ThreadPoolExecutor threadPoolExecutor;
// 
//     private final ThreadFactory threadFactory;
// 
//     @Inject public InteractorExecutor() {
//         this.responseHandler = new Handler(Looper.getMainLooper());
// 
//         this.workQueue = new LinkedBlockingQueue<>();
//         this.threadFactory = new JobThreadFactory();
//         this.threadPoolExecutor = new ThreadPoolExecutor(INITIAL_POOL_SIZE, MAX_POOL_SIZE,
//                 KEEP_ALIVE_TIME, KEEP_ALIVE_TIME_UNIT, this.workQueue, this.threadFactory);
//     }
// 
//     private static class JobThreadFactory implements ThreadFactory {
//         private static final String THREAD_NAME = "android_";
//         private int counter = 0;
// 
//         @Override public Thread newThread(Runnable runnable) {
//             return new Thread(runnable, THREAD_NAME + counter);
//         }
//     }
// }
// 
// Path: domain/src/main/java/com/sloydev/redbooth/interactor/GetTaskListInteractor.java
// public class GetTaskListInteractor implements Interactor {
// 
//     private final InteractorHandler interactorHandler;
//     private final TaskRepository taskRepository;
// 
//     private Callback<List<Task>> callback;
// 
//     @Inject public GetTaskListInteractor(InteractorHandler interactorHandler, TaskRepository taskRepository) {
//         this.interactorHandler = interactorHandler;
//         this.taskRepository = taskRepository;
//     }
// 
//     public void loadTaskList(Callback<List<Task>> callback) {
//         this.callback = callback;
//         interactorHandler.execute(this);
//     }
// 
//     @Override public void run() {
//         List<Task> tasks = taskRepository.getAll();
//         notifyLoaded(tasks);
//     }
// 
//     private void notifyLoaded(final List<Task> tasks) {
//         interactorHandler.postResponse(new Runnable() {
//             @Override public void run() {
//                 callback.onLoaded(tasks);
//             }
//         });
//     }
// 
// }
// 
// Path: domain/src/main/java/com/sloydev/redbooth/interactor/InteractorHandler.java
// public interface InteractorHandler {
//     void execute(Interactor interactor);
// 
//     void postResponse(Runnable responseRunnable);
// }


import com.sloydev.redbooth.data.executor.InteractorExecutor;
import com.sloydev.redbooth.interactor.GetTaskListInteractor;
import com.sloydev.redbooth.interactor.InteractorHandler;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
package com.sloydev.redbooth.data.dagger;




@Module(
        includes = {
                RepositoryModule.class,
                PreferenceModule.class,
        },
        injects = {
                GetTaskListInteractor.class,
        },
        library = true,
        complete = false
)
public class DataModule {
    @Provides @Singleton InteractorHandler provideInteractorHandler(InteractorExecutor interactorExecutor) {
// Path: data/src/main/java/com/sloydev/redbooth/data/executor/InteractorExecutor.java
// public class InteractorExecutor implements InteractorHandler {
// 
//     private final Handler responseHandler;
// 
//     @Override public void execute(Interactor interactor) {
//         if (interactor == null) {
//             throw new IllegalArgumentException("Interactor to execute cannot be null");
//         }
//         this.threadPoolExecutor.execute(interactor);
//     }
// 
//     @Override public void postResponse(Runnable responseRunnable) {
//         responseHandler.post(responseRunnable);
//     }
// 
//     private static final int INITIAL_POOL_SIZE = 3;
//     private static final int MAX_POOL_SIZE = 5;
// 
//     // Sets the amount of time an idle thread waits before terminating
//     private static final int KEEP_ALIVE_TIME = 10;
// 
//     // Sets the Time Unit to seconds
//     private static final TimeUnit KEEP_ALIVE_TIME_UNIT = TimeUnit.SECONDS;
// 
//     private final BlockingQueue<Runnable> workQueue;
// 
//     private final ThreadPoolExecutor threadPoolExecutor;
// 
//     private final ThreadFactory threadFactory;
// 
//     @Inject public InteractorExecutor() {
//         this.responseHandler = new Handler(Looper.getMainLooper());
// 
//         this.workQueue = new LinkedBlockingQueue<>();
//         this.threadFactory = new JobThreadFactory();
//         this.threadPoolExecutor = new ThreadPoolExecutor(INITIAL_POOL_SIZE, MAX_POOL_SIZE,
//                 KEEP_ALIVE_TIME, KEEP_ALIVE_TIME_UNIT, this.workQueue, this.threadFactory);
//     }
// 
//     private static class JobThreadFactory implements ThreadFactory {
//         private static final String THREAD_NAME = "android_";
//         private int counter = 0;
// 
//         @Override public Thread newThread(Runnable runnable) {
//             return new Thread(runnable, THREAD_NAME + counter);
//         }
//     }
// }
// 
// Path: domain/src/main/java/com/sloydev/redbooth/interactor/GetTaskListInteractor.java
// public class GetTaskListInteractor implements Interactor {
// 
//     private final InteractorHandler interactorHandler;
//     private final TaskRepository taskRepository;
// 
//     private Callback<List<Task>> callback;
// 
//     @Inject public GetTaskListInteractor(InteractorHandler interactorHandler, TaskRepository taskRepository) {
//         this.interactorHandler = interactorHandler;
//         this.taskRepository = taskRepository;
//     }
// 
//     public void loadTaskList(Callback<List<Task>> callback) {
//         this.callback = callback;
//         interactorHandler.execute(this);
//     }
// 
//     @Override public void run() {
//         List<Task> tasks = taskRepository.getAll();
//         notifyLoaded(tasks);
//     }
// 
//     private void notifyLoaded(final List<Task> tasks) {
//         interactorHandler.postResponse(new Runnable() {
//             @Override public void run() {
//                 callback.onLoaded(tasks);
//             }
//         });
//     }
// 
// }
// 
// Path: domain/src/main/java/com/sloydev/redbooth/interactor/InteractorHandler.java
// public interface InteractorHandler {
//     void execute(Interactor interactor);
// 
//     void postResponse(Runnable responseRunnable);
// }


// Path: data/src/main/java/com/sloydev/redbooth/data/dagger/DataModule.java
import com.sloydev.redbooth.data.executor.InteractorExecutor;
import com.sloydev.redbooth.interactor.GetTaskListInteractor;
import com.sloydev.redbooth.interactor.InteractorHandler;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;

package com.sloydev.redbooth.data.dagger;




@Module(
        includes = {
                RepositoryModule.class,
                PreferenceModule.class,
        },
        injects = {
                GetTaskListInteractor.class,
        },
        library = true,
        complete = false
)
public class DataModule {
    @Provides @Singleton InteractorHandler provideInteractorHandler(InteractorExecutor interactorExecutor) {
        return interactorExecutor;