Package io.netty.handler.ssl
Class OpenSslClientSessionCache
- java.lang.Object
-
- io.netty.handler.ssl.OpenSslSessionCache
-
- io.netty.handler.ssl.OpenSslClientSessionCache
-
- All Implemented Interfaces:
io.netty.internal.tcnative.SSLSessionCache
final class OpenSslClientSessionCache extends OpenSslSessionCache
OpenSslSessionCachethat is used by the client-side.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classOpenSslClientSessionCache.HostPortHost / Port tuple used to find aOpenSslInternalSessionin the cache.-
Nested classes/interfaces inherited from class io.netty.handler.ssl.OpenSslSessionCache
OpenSslSessionCache.NativeSslSession
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<OpenSslClientSessionCache.HostPort,java.util.Set<OpenSslSessionCache.NativeSslSession>>sessions
-
Constructor Summary
Constructors Constructor Description OpenSslClientSessionCache(OpenSslEngineMap engineMap)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidclear()Clear the cache and free all cached SSL_SESSION*.private static OpenSslClientSessionCache.HostPortkeyFor(java.lang.String host, int port)protected booleansessionCreated(OpenSslSessionCache.NativeSslSession session)Called once a newOpenSslInternalSessionwas created.protected voidsessionRemoved(OpenSslSessionCache.NativeSslSession session)Called once anOpenSslInternalSessionwas removed from the cache.(package private) booleansetSession(long ssl, OpenSslInternalSession session, java.lang.String host, int port)-
Methods inherited from class io.netty.handler.ssl.OpenSslSessionCache
containsSessionWithId, getIds, getSession, getSession, getSessionCacheSize, getSessionTimeout, removeSessionWithId, sessionCreated, setSessionCacheSize, setSessionTimeout
-
-
-
-
Field Detail
-
sessions
private final java.util.Map<OpenSslClientSessionCache.HostPort,java.util.Set<OpenSslSessionCache.NativeSslSession>> sessions
-
-
Constructor Detail
-
OpenSslClientSessionCache
OpenSslClientSessionCache(OpenSslEngineMap engineMap)
-
-
Method Detail
-
sessionCreated
protected boolean sessionCreated(OpenSslSessionCache.NativeSslSession session)
Description copied from class:OpenSslSessionCacheCalled once a newOpenSslInternalSessionwas created.- Overrides:
sessionCreatedin classOpenSslSessionCache- Parameters:
session- the new session.- Returns:
trueif the session should be cached,falseotherwise.
-
sessionRemoved
protected void sessionRemoved(OpenSslSessionCache.NativeSslSession session)
Description copied from class:OpenSslSessionCacheCalled once anOpenSslInternalSessionwas removed from the cache.- Overrides:
sessionRemovedin classOpenSslSessionCache- Parameters:
session- the session to remove.
-
setSession
boolean setSession(long ssl, OpenSslInternalSession session, java.lang.String host, int port)- Overrides:
setSessionin classOpenSslSessionCache
-
keyFor
private static OpenSslClientSessionCache.HostPort keyFor(java.lang.String host, int port)
-
clear
void clear()
Description copied from class:OpenSslSessionCacheClear the cache and free all cached SSL_SESSION*.- Overrides:
clearin classOpenSslSessionCache
-
-