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
OpenSslSessionCache
that is used by the client-side.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
OpenSslClientSessionCache.HostPort
Host / Port tuple used to find aOpenSslInternalSession
in 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) void
clear()
Clear the cache and free all cached SSL_SESSION*.private static OpenSslClientSessionCache.HostPort
keyFor(java.lang.String host, int port)
protected boolean
sessionCreated(OpenSslSessionCache.NativeSslSession session)
Called once a newOpenSslInternalSession
was created.protected void
sessionRemoved(OpenSslSessionCache.NativeSslSession session)
Called once anOpenSslInternalSession
was removed from the cache.(package private) boolean
setSession(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:OpenSslSessionCache
Called once a newOpenSslInternalSession
was created.- Overrides:
sessionCreated
in classOpenSslSessionCache
- Parameters:
session
- the new session.- Returns:
true
if the session should be cached,false
otherwise.
-
sessionRemoved
protected void sessionRemoved(OpenSslSessionCache.NativeSslSession session)
Description copied from class:OpenSslSessionCache
Called once anOpenSslInternalSession
was removed from the cache.- Overrides:
sessionRemoved
in classOpenSslSessionCache
- Parameters:
session
- the session to remove.
-
setSession
boolean setSession(long ssl, OpenSslInternalSession session, java.lang.String host, int port)
- Overrides:
setSession
in classOpenSslSessionCache
-
keyFor
private static OpenSslClientSessionCache.HostPort keyFor(java.lang.String host, int port)
-
clear
void clear()
Description copied from class:OpenSslSessionCache
Clear the cache and free all cached SSL_SESSION*.- Overrides:
clear
in classOpenSslSessionCache
-
-