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

@@ -1468,7 +1468,7 @@ public final boolean sendMessage(byte[] message, SocketData socketData, int mess
protected void setupPing() {
if(keepAliveInterval >= 500 && keepAliveInterval <= 600000) {
setPingTask(Scheduler.addTask(keepAliveInterval, new Scheduler.Task() {
public void evaluate() {
public void run() {
try {
sendPing(false);
}//try//
@@ -1479,7 +1479,7 @@ protected void setupPing() {
//Silently die: The ping task wasn't removed.//
Scheduler.removeTask(this);
}//catch//
}//evaluate()//
}//run()//
}, false));
}//if//
}//setupPing()//

View File

@@ -525,7 +525,7 @@ public class Orb {
this.socket = socket;
this.name = name;
}//CloseSocketTask()//
public synchronized void evaluate() {
public synchronized void run() {
if(!hasRun) {
Scheduler.removeTask(this);
@@ -538,7 +538,7 @@ public class Orb {
hasRun = true;
}//if//
}//evaluate()//
}//run()//
}//CloseSocketTask//
/**