Modified ThreadService & Scheduler to allow the web server to pass a delegate service such that all webapps will use one service for each function (reduction in threading and debug complexity).

This commit is contained in:
wcrisman
2014-08-30 15:43:30 -07:00
parent fba1f9f9b3
commit fa572dae03
15 changed files with 324 additions and 73 deletions

View File

@@ -0,0 +1,28 @@
package com.foundation.web;
import com.common.thread.ThreadService.IThreadServiceDelegate;
import com.foundation.web.interfaces.IThreadService;
public class ThreadServiceDelegate implements IThreadServiceDelegate {
private IThreadService threadService;
public ThreadServiceDelegate(IThreadService threadService) {
this.threadService = threadService;
}//ThreadServiceDelegate()//
public boolean isRunning() {
return threadService.isRunning();
}//isRunning()//
public void run(Runnable target) {
threadService.run(target);
}//run()//
public void run(Runnable target, int priority) {
threadService.run(target, priority);
}//run()//
public Thread run(Runnable target, boolean queueable) {
threadService.run(target, queueable);
return null;
}//run()//
public Thread run(Runnable target, int priority, boolean queueable) {
threadService.run(target, priority, queueable);
return null;
}//run()//
}//ThreadServiceDelegate//