use of lucee.runtime.config.ConfigServer in project Lucee by lucee.
the class Admin method doTerminateRunningThread.
private void doTerminateRunningThread() throws PageException {
int id = getInt("admin", "RemoveRunningThread", "id");
if (type == TYPE_WEB) {
terminateRunningThread(pageContext.getConfig(), id);
} else {
ConfigServer cs = pageContext.getConfig().getConfigServer(password);
ConfigWeb[] webs = cs.getConfigWebs();
for (int i = 0; i < webs.length; i++) {
if (terminateRunningThread(webs[i], id))
break;
}
}
}
use of lucee.runtime.config.ConfigServer in project Lucee by lucee.
the class Admin method doGetSecurityManager.
private void doGetSecurityManager() throws PageException {
ConfigServer cs = ConfigImpl.getConfigServer(config, password);
SecurityManager sm = cs.getSecurityManager(getString("admin", action, "id"));
_fillSecData(sm);
}
use of lucee.runtime.config.ConfigServer in project Lucee by lucee.
the class Admin method doGetDefaultSecurityManager.
/**
* @throws PageException
*/
private void doGetDefaultSecurityManager() throws PageException {
ConfigServer cs = ConfigImpl.getConfigServer(config, password);
SecurityManager dsm = cs.getDefaultSecurityManager();
_fillSecData(dsm);
}
use of lucee.runtime.config.ConfigServer in project Lucee by lucee.
the class Admin method doStopThread.
private void doStopThread() throws PageException {
String contextId = getString("admin", "stopThread", "contextId");
String threadId = getString("admin", "stopThread", "threadId");
String stopType = getString("stopType", "exception");
if (!(config instanceof ConfigServer))
throw new ApplicationException("invalid context for this action");
ConfigServer cs = (ConfigServer) config;
ConfigWeb[] webs = cs.getConfigWebs();
boolean has = false;
for (int i = 0; i < webs.length; i++) {
ConfigWebImpl cw = (ConfigWebImpl) webs[i];
if (!cw.getIdentification().getId().equals(contextId))
continue;
((CFMLFactoryImpl) cw.getFactory()).stopThread(threadId, stopType);
has = true;
break;
}
if (!has) {
for (int i = 0; i < webs.length; i++) {
ConfigWebImpl cw = (ConfigWebImpl) webs[i];
if (!contextId.equals(cw.getLabel()))
continue;
((CFMLFactoryImpl) cw.getFactory()).stopThread(threadId, stopType);
has = true;
break;
}
}
}
use of lucee.runtime.config.ConfigServer in project Lucee by lucee.
the class Admin method doGetRunningThreads.
private void doGetRunningThreads() throws PageException {
lucee.runtime.type.Query qry = new QueryImpl(new String[] { "Id", "Start", "Timeout", "ThreadType", "StackTrace", "TagContext", "Label", "RootPath", "ConfigFile", "URL" }, 0, "query");
if (type == TYPE_WEB) {
fillGetRunningThreads(qry, pageContext.getConfig());
} else {
ConfigServer cs = pageContext.getConfig().getConfigServer(password);
ConfigWeb[] webs = cs.getConfigWebs();
for (int i = 0; i < webs.length; i++) {
fillGetRunningThreads(qry, webs[i]);
}
}
pageContext.setVariable(getString("admin", action, "returnVariable"), qry);
}
Aggregations