if (tlsMap.get(t.getId()) != null) {
throw new RuntimeException("TLS Server Parameters " + t.getId()
+ " is configured more than once.");
}
try {
TLSServerParametersConfig con =
new TLSServerParametersConfig(t.getTlsServerParameters());
tlsMap.put(t.getId(), con);
} catch (Exception e) {
throw new RuntimeException(
"Could not configure TLS in " + t.getId(), e);
}
}
for (JettyHTTPServerEngineConfigType t : config.getEngine()) {
ThreadingParameters tparams = null;
if (t.getThreadingParametersRef() != null) {
String id = t.getThreadingParametersRef().getId();
tparams = threadingMap.get(id);
if (tparams == null) {
throw new RuntimeException("Could not find \""
+ id + "\" as threading parameters");
}
} else if (t.getThreadingParameters() != null) {
tparams = toThreadingParameters(t.getThreadingParameters());
}
TLSServerParameters tlsParams = null;
if (t.getTlsServerParametersRef() != null) {
String id = t.getTlsServerParametersRef().getId();
tlsParams = tlsMap.get(id);
if (tlsParams == null) {
throw new RuntimeException("Could not find \""
+ id + "\" as TLS Server Parameters");
}
} else if (t.getTlsServerParameters() != null) {
try {
tlsParams =
new TLSServerParametersConfig(t.getTlsServerParameters());
} catch (Exception e) {
throw new RuntimeException(
"Could not configure TLS for port " + t.getPort(), e);
}
}