Java Code Examples for org.apache.tomcat.jni.SSL#SSL_SESS_CACHE_SERVER

The following examples show how to use org.apache.tomcat.jni.SSL#SSL_SESS_CACHE_SERVER . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OpenSslServerSessionContext.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public void setSessionCacheEnabled(boolean enabled) {
    long mode = enabled ? SSL.SSL_SESS_CACHE_SERVER : SSL.SSL_SESS_CACHE_OFF;
    SSLContext.setSessionCacheMode(context, mode);
}
 
Example 2
Source File: OpenSslServerSessionContext.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isSessionCacheEnabled() {
    return SSLContext.getSessionCacheMode(context) == SSL.SSL_SESS_CACHE_SERVER;
}
 
Example 3
Source File: OpenSSLSessionContext.java    From Tomcat8-Source-Read with MIT License 2 votes vote down vote up
/**
 * Enable or disable caching of SSL sessions.
 *
 * @param enabled {@code true} to enable caching, {@code false} to disable
 */
public void setSessionCacheEnabled(boolean enabled) {
    long mode = enabled ? SSL.SSL_SESS_CACHE_SERVER : SSL.SSL_SESS_CACHE_OFF;
    SSLContext.setSessionCacheMode(contextID, mode);
}
 
Example 4
Source File: OpenSSLSessionContext.java    From Tomcat8-Source-Read with MIT License 2 votes vote down vote up
/**
 * @return {@code true} if caching of SSL sessions is enabled, {@code false}
 *         otherwise.
 */
public boolean isSessionCacheEnabled() {
    return SSLContext.getSessionCacheMode(contextID) == SSL.SSL_SESS_CACHE_SERVER;
}