public static void saveThreadPoolValues(HandlerContext handlerCtx) {
String configName = (String) handlerCtx.getInputValue("ConfigName");
ConfigConfig config = AMXUtil.getConfig(configName);
String threadPoolId = (String)handlerCtx.getInputValue("ThreadPoolId");
try{
ThreadPoolConfig threadConfig = null;
Boolean edit = (Boolean) handlerCtx.getInputValue("Edit");
if(!edit){
threadConfig = config.createThreadPoolConfig(threadPoolId, new HashMap());
} else {
Map threadPoolsMap = config.getThreadPoolConfigMap();
threadConfig = (ThreadPoolConfig)threadPoolsMap.get(threadPoolId);
}
threadConfig.setMinThreadPoolSize((String)handlerCtx.getInputValue("MinPoolSize"));
threadConfig.setMaxThreadPoolSize((String)handlerCtx.getInputValue("MaxPoolSize"));
threadConfig.setIdleThreadTimeoutInSeconds((String)handlerCtx.getInputValue("IdleTimeout"));
threadConfig.setNumWorkQueues((String)handlerCtx.getInputValue("NoWorkQ"));
}catch (Exception ex){
GuiUtil.handleException(handlerCtx, ex);
}
}