Package io.netty.internal.tcnative
Class SSLSession
- java.lang.Object
-
- io.netty.internal.tcnative.SSLSession
-
public final class SSLSession extends java.lang.Object
Methods to operate on aSSL_SESSION
.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SSLSession()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
free(long session)
See SSL_SESSION_free.static byte[]
getSessionId(long session)
See SSL_SESSION_get_id.static long
getTime(long session)
See SSL_SESSION_get_time.static long
getTimeout(long session)
static long
setTimeout(long session, long seconds)
static boolean
shouldBeSingleUse(long session)
Will returntrue
if the session should only re-used once.static boolean
upRef(long session)
See SSL_SESSION_up_ref.
-
-
-
Method Detail
-
getTime
public static long getTime(long session)
See SSL_SESSION_get_time.- Parameters:
session
- the SSL_SESSION instance (SSL_SESSION *)- Returns:
- returns the time at which the session was established. The time is given in seconds since the Epoch
-
getTimeout
public static long getTimeout(long session)
- Parameters:
session
- the SSL_SESSION instance (SSL_SESSION *)- Returns:
- returns the timeout for the session. The time is given in seconds since the Epoch
-
setTimeout
public static long setTimeout(long session, long seconds)
- Parameters:
session
- the SSL_SESSION instance (SSL_SESSION *)seconds
- timeout in seconds- Returns:
- returns the timeout for the session before this call. The time is given in seconds since the Epoch
-
getSessionId
public static byte[] getSessionId(long session)
See SSL_SESSION_get_id.- Parameters:
session
- the SSL_SESSION instance (SSL_SESSION *)- Returns:
- the session id as byte array representation obtained via SSL_SESSION_get_id.
-
upRef
public static boolean upRef(long session)
See SSL_SESSION_up_ref.- Parameters:
session
- the SSL_SESSION instance (SSL_SESSION *)- Returns:
true
if successful,false
otherwise.
-
free
public static void free(long session)
See SSL_SESSION_free.- Parameters:
session
- the SSL_SESSION instance (SSL_SESSION *)
-
shouldBeSingleUse
public static boolean shouldBeSingleUse(long session)
Will returntrue
if the session should only re-used once. See SSL_SESSION_should_be_single_use.- Parameters:
session
-- Returns:
true
if the session should be re-used once only,false
otherwise.
-
-