String className = model.get(CLASS_NAME.getName()).asString();
String moduleName = model.get(MODULE.getName()).asString();
Map<String, String> params = unwrap(model);
UndertowLogger.ROOT_LOGGER.debugf("Creating http handler %s from module %s with parameters %s", className, moduleName, params);
Class<?> clazz = getHandlerClass(className, moduleName);
ConfiguredHandlerWrapper wrapper = new ConfiguredHandlerWrapper(clazz, params);
if (predicate != null) {
return Handlers.predicate(predicate, wrapper.wrap(next), next);
} else {
return wrapper.wrap(next);
}
}