public interface SSLSessionContext
SSLSessionContext表示一组与一个单一的实体相关联的
SSLSessions。例如,它可以与一个参与多个会话的服务器或客户端相关联。
并不是所有的环境都包含会话上下文。
有SSLSessionContext参数是如何影响会话存储:
SSLSessionContext可以上市。
SSLSession
| Modifier and Type | Method and Description |
|---|---|
Enumeration<byte[]> |
getIds()
返回所有的会话ID的组合在这一
SSLSessionContext枚举。
|
SSLSession |
getSession(byte[] sessionId)
返回
SSLSession绑定到指定的会话ID。
|
int |
getSessionCacheSize()
返回用于存储
SSLSession对象归入这
SSLSessionContext缓存大小。
|
int |
getSessionTimeout()
返回
SSLSession对象归入这
SSLSessionContext超时限制。
|
void |
setSessionCacheSize(int size)
设置用于存储
SSLSession对象归入这
SSLSessionContext缓存大小。
|
void |
setSessionTimeout(int seconds)
设置
SSLSession对象归入这
SSLSessionContext超时限制。
|
SSLSession getSession(byte[] sessionId)
SSLSession绑定到指定的会话ID。
sessionId -会话标识符
SSLSession或空会话ID没有指向有效的sslsession。
NullPointerException -如果
sessionId是空的。
Enumeration<byte[]> getIds()
SSLSessionContext枚举。
void setSessionTimeout(int seconds)
throws IllegalArgumentException
SSLSession对象归入这
SSLSessionContext超时限制。
如果超时限制设置为“T”秒,则在创建时间后,一个会话超过超时限制“T”秒。当超时限制超过一届,SSLSession对象是无效的和未来的连接不能恢复或重新加入会话。一个会话超时检查超过了立即超时限制是这个SSLSessionContext改变。
seconds -新的会话超时限制秒;零表示没有限制。
IllegalArgumentException -如果指定的超时时间是
< 0。
getSessionTimeout()
int getSessionTimeout()
SSLSession对象归入这
SSLSessionContext超时限制。
如果超时限制设置为“T”秒,则在创建时间后,一个会话超过超时限制“T”秒。当超时限制超过一届,SSLSession对象是无效的和未来的连接不能恢复或重新加入会话。一个会话的超时限制,超过则检查立即超时限制是这个SSLSessionContext改变。
setSessionTimeout(int)
void setSessionCacheSize(int size)
throws IllegalArgumentException
SSLSession对象归入这
SSLSessionContext缓存大小。
size -新的session缓存大小的限制;零表示没有限制。
IllegalArgumentException -如果指定的大小
< 0。
getSessionCacheSize()
int getSessionCacheSize()
SSLSession对象归入这
SSLSessionContext缓存大小。
setSessionCacheSize(int)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.