TrustManagerFactory tmf = TrustManagerFactory.getInstance(getAlgorithm());
tmf.init(ts);
sslContext = SSLContext.getInstance(getSslProtocol());
sslContext.init(wrap(kmf.getKeyManagers()), tmf.getTrustManagers(), null);
SSLSessionContext sessionContext =
sslContext.getServerSessionContext();
if (sessionContext != null) {
if (getSessionCacheSize() != null) {
sessionContext.setSessionCacheSize(
Integer.parseInt(getSessionCacheSize()));
}
if (getSessionTimeout() != null) {
sessionContext.setSessionTimeout(
Integer.parseInt(getSessionTimeout()));
}
}
}