Package io.netty.internal.tcnative
Class SSLSession
java.lang.Object
io.netty.internal.tcnative.SSLSession
Methods to operate on a
SSL_SESSION
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Constructor Details
-
SSLSession
private SSLSession()
-
-
Method Details
-
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.
-