/* * Configures the given SSLSessionContext. * * @param sslSessionCtxt The SSLSessionContext to configure */ private void configureSSLSessionContext(SSLSessionContext sslSessionCtxt) { String attrValue = (String) attributes.get("sslSessionTimeout"); if (attrValue != null) { sslSessionCtxt.setSessionTimeout(Integer.valueOf(attrValue).intValue()); } attrValue = (String) attributes.get("ssl3SessionTimeout"); if (attrValue != null) { sslSessionCtxt.setSessionTimeout(Integer.valueOf(attrValue).intValue()); } attrValue = (String) attributes.get("sslSessionCacheSize"); if (attrValue != null) { sslSessionCtxt.setSessionCacheSize(Integer.valueOf(attrValue).intValue()); } }
@Override public void configureSessionContext(SSLSessionContext sslSessionContext) { int sessionCacheSize; if (endpoint.getSessionCacheSize() != null) { sessionCacheSize = Integer.parseInt(endpoint.getSessionCacheSize()); } else { sessionCacheSize = defaultSessionCacheSize; } int sessionTimeout; if (endpoint.getSessionTimeout() != null) { sessionTimeout = Integer.parseInt(endpoint.getSessionTimeout()); } else { sessionTimeout = defaultSessionTimeout; } sslSessionContext.setSessionCacheSize(sessionCacheSize); sslSessionContext.setSessionTimeout(sessionTimeout); }