Top Description Methods
io.netty.handler.ssl

pack-priv Interface OpenSslSession

extends SSLSession
Known Direct Implementers
io.netty.handler.ssl.OpenSslSessionCache.NativeSslSession, io.netty.handler.ssl.ReferenceCountedOpenSslEngine.DefaultOpenSslSession, io.netty.handler.ssl.ExtendedOpenSslSession
Imports
javax.net.ssl.SSLException, .SSLSession, java.security.cert.Certificate, java.util.Map

SSLSession that is specific to our native implementation.

Method Summary

Modifier and TypeMethod and Description
public OpenSslSessionContext
getSessionContext()

Redeclares javax.net.ssl.SSLSession.getSessionContext.

Returns the context in which this session is bound.
public void
handshakeFinished(byte[] id, String cipher, String protocol, byte[] peerCertificate, byte[][] peerCertificateChain, long creationTime, long timeout)

Called once the handshake has completed.

public Map<String, Object>

Returns:

storage
keyValueStorage
()

Return the underlying Map that is used by the following methods:

public void
prepareHandshake()

Called on a handshake session before being exposed to a javax.net.ssl.TrustManager.

public OpenSslSessionId
sessionId()

Return the OpenSslSessionId that can be used to identify this session.

public void
setLastAccessedTime(long
the time
time
)

Set the last access time which will be returned by getLastAccessedTime().

public void
setLocalCertificate(Certificate[] localCertificate)

Set the local certificate chain that is used.

public void
setSessionDetails(long
the time at which the session was created.
creationTime
,
long
the time at which the session was last accessed via the session infrastructure (cache).
lastAccessedTime
,
OpenSslSessionId id, Map<String, Object>
the key value store. See keyValueStorage().
keyValueStorage
)

Set the details for the session which might come from a cache.

public void
tryExpandApplicationBufferSize(int
The packet size which exceeds the current getApplicationBufferSize().
packetLengthDataOnly
)

Expand (or increase) the value returned by getApplicationBufferSize() if necessary.

Inherited from javax.net.ssl.SSLSession:
getApplicationBufferSizegetCipherSuitegetCreationTimegetIdgetLastAccessedTimegetLocalCertificatesgetLocalPrincipalgetPacketBufferSizegetPeerCertificateChaingetPeerCertificatesgetPeerHostgetPeerPortgetPeerPrincipalgetProtocolgetValuegetValueNamesinvalidateisValidputValueremoveValue

Method Detail

getSessionContextback to summary
public OpenSslSessionContext getSessionContext()

Redeclares javax.net.ssl.SSLSession.getSessionContext.

Doc from javax.net.ssl.SSLSession.getSessionContext.

Returns the context in which this session is bound.

This context may be unavailable in some environments, in which case this method returns null.

If the context is available and there is a security manager installed, the caller may require permission to access it or a security exception may be thrown. In a Java environment, the security manager's checkPermission method is called with a SSLPermission("getSSLSessionContext") permission.

Returns:OpenSslSessionContext

the session context used for this session, or null if the context is unavailable.

Annotations
@Override
handshakeFinishedback to summary
public void handshakeFinished(byte[] id, String cipher, String protocol, byte[] peerCertificate, byte[][] peerCertificateChain, long creationTime, long timeout) throws SSLException

Called once the handshake has completed.

keyValueStorageback to summary
public Map<String, Object> keyValueStorage()

Return the underlying Map that is used by the following methods:

The Map must be thread-safe!
Returns:Map<String, Object>

storage

prepareHandshakeback to summary
public void prepareHandshake()

Called on a handshake session before being exposed to a javax.net.ssl.TrustManager. Session data must be cleared by this call.

sessionIdback to summary
public OpenSslSessionId sessionId()

Return the OpenSslSessionId that can be used to identify this session.

setLastAccessedTimeback to summary
public void setLastAccessedTime(long time)

Set the last access time which will be returned by getLastAccessedTime().

Parameters
time:long

the time

setLocalCertificateback to summary
public void setLocalCertificate(Certificate[] localCertificate)

Set the local certificate chain that is used. It is not expected that this array will be changed at all and so its ok to not copy the array.

setSessionDetailsback to summary
public void setSessionDetails(long creationTime, long lastAccessedTime, OpenSslSessionId id, Map<String, Object> keyValueStorage)

Set the details for the session which might come from a cache.

Parameters
creationTime:long

the time at which the session was created.

lastAccessedTime:long

the time at which the session was last accessed via the session infrastructure (cache).

id:OpenSslSessionId

the OpenSslSessionId

keyValueStorage:Map<String, Object>

the key value store. See keyValueStorage().

tryExpandApplicationBufferSizeback to summary
public void tryExpandApplicationBufferSize(int packetLengthDataOnly)

Expand (or increase) the value returned by getApplicationBufferSize() if necessary.

This is only called in a synchronized block, so no need to use atomic operations.

Parameters
packetLengthDataOnly:int

The packet size which exceeds the current getApplicationBufferSize().