Search in sources :

Example 1 with SpoolerEngine

use of lucee.runtime.spooler.SpoolerEngine in project Lucee by lucee.

the class Admin method doGetMailSetting.

/**
 * @throws PageException
 */
private void doGetMailSetting() throws PageException {
    Struct sct = new StructImpl();
    pageContext.setVariable(getString("admin", action, "returnVariable"), sct);
    int maxThreads = 20;
    SpoolerEngine engine = config.getSpoolerEngine();
    if (engine instanceof SpoolerEngineImpl) {
        maxThreads = ((SpoolerEngineImpl) engine).getMaxThreads();
    }
    sct.set("spoolEnable", Caster.toBoolean(config.isMailSpoolEnable()));
    sct.set("spoolInterval", Caster.toInteger(config.getMailSpoolInterval()));
    sct.set("maxThreads", Caster.toDouble(maxThreads));
    sct.set("timeout", Caster.toInteger(config.getMailTimeout()));
    sct.set("defaultencoding", config.getMailDefaultCharset().name());
}
Also used : StructImpl(lucee.runtime.type.StructImpl) SpoolerEngine(lucee.runtime.spooler.SpoolerEngine) SpoolerEngineImpl(lucee.runtime.spooler.SpoolerEngineImpl) Struct(lucee.runtime.type.Struct)

Example 2 with SpoolerEngine

use of lucee.runtime.spooler.SpoolerEngine in project Lucee by lucee.

the class Admin method doGetTaskSetting.

private void doGetTaskSetting() throws PageException {
    Struct sct = new StructImpl();
    pageContext.setVariable(getString("admin", action, "returnVariable"), sct);
    int maxThreads = 20;
    SpoolerEngine engine = config.getSpoolerEngine();
    if (engine instanceof SpoolerEngineImpl) {
        SpoolerEngineImpl ei = ((SpoolerEngineImpl) engine);
        maxThreads = ei.getMaxThreads();
    }
    sct.set("maxThreads", Caster.toDouble(maxThreads));
}
Also used : StructImpl(lucee.runtime.type.StructImpl) SpoolerEngine(lucee.runtime.spooler.SpoolerEngine) SpoolerEngineImpl(lucee.runtime.spooler.SpoolerEngineImpl) Struct(lucee.runtime.type.Struct)

Aggregations

SpoolerEngine (lucee.runtime.spooler.SpoolerEngine)2 SpoolerEngineImpl (lucee.runtime.spooler.SpoolerEngineImpl)2 Struct (lucee.runtime.type.Struct)2 StructImpl (lucee.runtime.type.StructImpl)2