Map<String, ThreadingParameters> threadingParametersMap
= new TreeMap<String, ThreadingParameters>();
if (config.getIdentifiedThreadingParameters() != null) {
for (ThreadingParametersIdentifiedType threads : config.getIdentifiedThreadingParameters()) {
ThreadingParameters rThreads = new ThreadingParameters();
String id = threads.getId();
rThreads.setThreadPoolSize(threads.getThreadingParameters().getThreadPoolSize());
threadingParametersMap.put(id, rThreads);
}
factory.setThreadingParametersMap(threadingParametersMap);
}
//SSL
Map<String, TLSServerParameters> sslMap = new TreeMap<String, TLSServerParameters>();
if (config.getIdentifiedTLSServerParameters() != null) {
for (TLSServerParametersIdentifiedType t : config.getIdentifiedTLSServerParameters()) {
try {
TLSServerParameters parameter
= new TLSServerParametersConfig(t.getTlsServerParameters());
sslMap.put(t.getId(), parameter);
} catch (Exception e) {
throw new RuntimeException("Could not configure TLS for id " + t.getId(), e);
}
}
factory.setTlsServerParameters(sslMap);
}
//Engines
List<NettyHttpServerEngine> engineList = new ArrayList<NettyHttpServerEngine>();
for (NettyHttpServerEngineConfigType engine : config.getEngine()) {
NettyHttpServerEngine eng = new NettyHttpServerEngine();
if (engine.getHost() != null && !StringUtils.isEmpty(engine.getHost())) {
eng.setHost(engine.getHost());
}
if (engine.getReadIdleTime() != null) {
eng.setReadIdleTime(engine.getReadIdleTime());
}
if (engine.getWriteIdleTime() != null) {
eng.setWriteIdleTime(engine.getWriteIdleTime());
}
if (engine.getMaxChunkContentSize() != null) {
eng.setMaxChunkContentSize(engine.getMaxChunkContentSize());
}
if (engine.getPort() != null) {
eng.setPort(engine.getPort());
}
if (engine.isSessionSupport() != null) {
eng.setSessionSupport(engine.isSessionSupport());
}
if (engine.getThreadingParameters() != null) {
ThreadingParametersType threads = engine.getThreadingParameters();
ThreadingParameters rThreads = new ThreadingParameters();
rThreads.setThreadPoolSize(threads.getThreadPoolSize());
eng.setThreadingParameters(rThreads);
}
//eng.setServer(engine.getTlsServerParameters());
if (engine.getTlsServerParameters() != null) {