* Client Apps: Add new parameter for clients.config,
clientApp.x.startOnLoad=false, to disable loading (for SAM for example). Defaults to true of course.
This commit is contained in:
@ -41,10 +41,17 @@ class LoadClientAppsJob extends JobImpl {
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
String className = clientApps.getProperty("clientApp."+i+".main");
|
String className = clientApps.getProperty("clientApp."+i+".main");
|
||||||
|
if (className == null)
|
||||||
|
break;
|
||||||
String clientName = clientApps.getProperty("clientApp."+i+".name");
|
String clientName = clientApps.getProperty("clientApp."+i+".name");
|
||||||
String args = clientApps.getProperty("clientApp."+i+".args");
|
String args = clientApps.getProperty("clientApp."+i+".args");
|
||||||
String delayStr = clientApps.getProperty("clientApp." + i + ".delay");
|
String delayStr = clientApps.getProperty("clientApp." + i + ".delay");
|
||||||
String onBoot = clientApps.getProperty("clientApp." + i + ".onBoot");
|
String onBoot = clientApps.getProperty("clientApp." + i + ".onBoot");
|
||||||
|
String disabled = clientApps.getProperty("clientApp." + i + ".startOnLoad");
|
||||||
|
i++;
|
||||||
|
if (disabled != null && "false".equals(disabled))
|
||||||
|
continue;
|
||||||
|
|
||||||
boolean onStartup = false;
|
boolean onStartup = false;
|
||||||
if (onBoot != null)
|
if (onBoot != null)
|
||||||
onStartup = "true".equals(onBoot) || "yes".equals(onBoot);
|
onStartup = "true".equals(onBoot) || "yes".equals(onBoot);
|
||||||
@ -53,9 +60,6 @@ class LoadClientAppsJob extends JobImpl {
|
|||||||
if (delayStr != null)
|
if (delayStr != null)
|
||||||
try { delay = 1000*Integer.parseInt(delayStr); } catch (NumberFormatException nfe) {}
|
try { delay = 1000*Integer.parseInt(delayStr); } catch (NumberFormatException nfe) {}
|
||||||
|
|
||||||
if (className == null)
|
|
||||||
break;
|
|
||||||
|
|
||||||
String argVal[] = parseArgs(args);
|
String argVal[] = parseArgs(args);
|
||||||
if (onStartup) {
|
if (onStartup) {
|
||||||
// run this guy now
|
// run this guy now
|
||||||
@ -64,7 +68,6 @@ class LoadClientAppsJob extends JobImpl {
|
|||||||
// wait before firing it up
|
// wait before firing it up
|
||||||
getContext().jobQueue().addJob(new DelayedRunClient(getContext(), className, clientName, argVal, delay));
|
getContext().jobQueue().addJob(new DelayedRunClient(getContext(), className, clientName, argVal, delay));
|
||||||
}
|
}
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user