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:
@@ -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//
|
||||
Reference in New Issue
Block a user