diff --git a/src/java.base/share/classes/javax/net/ssl/SSLSessionContext.java b/src/java.base/share/classes/javax/net/ssl/SSLSessionContext.java index e4b2560415f..fd5ef0bcc58 100644 --- a/src/java.base/share/classes/javax/net/ssl/SSLSessionContext.java +++ b/src/java.base/share/classes/javax/net/ssl/SSLSessionContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,8 +30,8 @@ import java.util.Enumeration; /** - * A SSLSessionContext represents a set of - * SSLSessions associated with a single entity. For example, + * A {@code SSLSessionContext} represents a set of + * {@code SSLSession}s associated with a single entity. For example, * it could be associated with a server or client who participates in many * sessions concurrently. *

@@ -41,7 +41,7 @@ import java.util.Enumeration; * Session contexts may not contain all sessions. For example, stateless * sessions are not stored in the session context. *

- * There are SSLSessionContext parameters that affect how + * There are {@code SSLSessionContext} parameters that affect how * sessions are stored: *

* A session can be retrieved based on its session id, and all session id's - * in a SSLSessionContext can be listed. + * in a {@code SSLSessionContext} can be listed. * * @see SSLSession * @@ -61,19 +61,19 @@ import java.util.Enumeration; public interface SSLSessionContext { /** - * Returns the SSLSession bound to the specified session id. + * Returns the {@code SSLSession} bound to the specified session id. * * @param sessionId the Session identifier - * @return the SSLSession or null if + * @return the {@code SSLSession} or null if * the specified session id does not refer to a valid SSLSession. * - * @throws NullPointerException if sessionId is null. + * @throws NullPointerException if {@code sessionId} is null. */ SSLSession getSession(byte[] sessionId); /** * Returns an Enumeration of all known session id's grouped under this - * SSLSessionContext. + * {@code SSLSessionContext}. *

Session contexts may not contain all sessions. For example, * stateless sessions are not stored in the session context. * @@ -82,16 +82,17 @@ public interface SSLSessionContext { Enumeration getIds(); /** - * Sets the timeout limit for SSLSession objects grouped - * under this SSLSessionContext. + * Sets the timeout limit for {@code SSLSession} objects grouped + * under this {@code SSLSessionContext}. *

* If the timeout limit is set to 't' seconds, a session exceeds the * timeout limit 't' seconds after its creation time. * When the timeout limit is exceeded for a session, the - * SSLSession object is invalidated and future connections - * cannot resume or rejoin the session. + * {@code SSLSession} object is marked so that future connections + * cannot resume or rejoin the session. Active sessions can continue + * to be used so long as resume and rejoin operations are not attempted. * A check for sessions exceeding the timeout is made immediately whenever - * the timeout limit is changed for this SSLSessionContext. + * the timeout limit is changed for this {@code SSLSessionContext}. * * @apiNote Note that the JDK Implementation uses default values for both * the session cache size and timeout. See @@ -109,17 +110,18 @@ public interface SSLSessionContext { void setSessionTimeout(int seconds); /** - * Returns the timeout limit of SSLSession objects grouped - * under this SSLSessionContext. + * Returns the timeout limit of {@code SSLSession} objects grouped + * under this {@code SSLSessionContext}. *

* If the timeout limit is set to 't' seconds, a session exceeds the * timeout limit 't' seconds after its creation time. * When the timeout limit is exceeded for a session, the - * SSLSession object is invalidated and future connections - * cannot resume or rejoin the session. + * {@code SSLSession} object is marked so that future connections + * cannot resume or rejoin the session. Active sessions can continue + * to be used so long as resume and rejoin operations are not attempted. * A check for sessions exceeding the timeout limit is made immediately * whenever the timeout limit is changed for this - * SSLSessionContext. + * {@code SSLSessionContext}. * * @implNote The JDK implementation returns the session timeout as set by * the {@code setSessionTimeout} method, or if not set, a default @@ -133,8 +135,8 @@ public interface SSLSessionContext { int getSessionTimeout(); /** - * Sets the size of the cache used for storing SSLSession - * objects grouped under this SSLSessionContext. + * Sets the size of the cache used for storing {@code SSLSession} + * objects grouped under this {@code SSLSessionContext}. * * @apiNote Note that the JDK Implementation uses default values for both * the session cache size and timeout. See @@ -152,8 +154,8 @@ public interface SSLSessionContext { void setSessionCacheSize(int size); /** - * Returns the size of the cache used for storing SSLSession - * objects grouped under this SSLSessionContext. + * Returns the size of the cache used for storing {@code SSLSession} + * objects grouped under this {@code SSLSessionContext}. * * @implNote The JDK implementation returns the cache size as set by * the {@code setSessionCacheSize} method, or if not set, the